I'm trying to fit a propensity score weighted logistic regression model with PSweight package. My dataset contains clusters defined by the "ID" variable therefore I ran the "_cl" alternatives.

First, I defined the PS formula

ps.any_cl<-Gruppo Age+Sex+SpO2+FC+PAS1+GCS+Sincope+EPA+Primo_episodio+antiaritmici+PTCA_BPAC+Pat_congenita+(1|ID) 

then I tried to evaluate the balance obtained with the different weighting modalities:

bal.any_cl <- SumStat_cl(ps.formula = ps.any_cl, data = data, weight=c("overlap")

This is the error I'm obtaining:

boundary (singular) fit: see help('isSingular') Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent `

Of note, I do not obtain any error if I use the non-cluster options of the PSweight package

Moreover,if I try to fit the model also considering clusters, I have no problems with that

ato.any_cl<-PSweight_cl(
  ps.formula = ps.any_cl,
  yname="Esito",
  data=data,
  weight = "overlap",
  delta = 0,
  augmentation = FALSE,
  bootstrap = FALSE,
  bs_level = NULL,
  R = 50,
  out.formula = NULL,
  family = "binomial",
  nAGQ = 1L
)
summary(ato.any_cl)

`Closed-form inference:

Original group value: 0, 1

Contrast: 0 1 Contrast 1 -1 1

        Estimate Std.Error       lwr     upr Pr(>|z|)

Contrast 1 0.123066 0.095590 -0.064288 0.31042 0.1979`

I've tried:

  • simplyfing the variables in the PS by removing one by one but I always receive the same error
  • building a cluster PS with the "psdata_cl" dataset obtained with the PSweight package and it worked, but I could not find a solution for my data.

Have you got any ideas?

Thank you in advance

Lorenzo

0

There are 0 best solutions below