0

I did my analyses with spss, but now I wanted to use bootstrapping, so I'm trying to "translate" my model into r (I'm still a complete newbie here). Unfortunately, I do not get nearly the same results, which makes me very unsure - what could have caused this problems? Is there maybe any specification in th r-code which doesn't "match" my spss-model? Briefly about my data: I have several measurements (after different stimuli) of individuals nested in groups ( therefore using mlm). The dependent variable is the affiliation to a cluster (binary coded). As independent variables I have two variables which were measured on a 7-point scale.

My spss syntax fpr the random intercept model is:

 GENLINMIXED
  /DATA_STRUCTURE SUBJECTS=Group*Person
  /FIELDS TARGET=Cluster_affiliation_binary  TRIALS=NONE OFFSET=NONE
  /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT
  /FIXED  EFFECTS=independent_variable_1 independent_variable_2 USE_INTERCEPT=TRUE
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Group COVARIANCE_TYPE=VARIANCE_COMPONENTS 
  /RANDOM USE_INTERCEPT=TRUE SUBJECTS=Group*Person COVARIANCE_TYPE=VARIANCE_COMPONENTS 
  /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=DESCENDING  
    MAX_ITERATIONS=100 CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=ROBUST PCONVERGE=0.000001(ABSOLUTE) 
    SCORING=0 SINGULAR=0.000000000001
  /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD.

my respective R-Model is:

fixed_slopes <- glmer(Cluster_affiliation_binary ~ 1 + independent_variable_1 + independent_variable_2 + (1| Group / Person),   
                      data=my_data, family=binomial(link=logit), control=glmerControl(check.conv.singular = .makeCC(action = "ignore",  tol = 1e-4)),
                      nAGQ = 100) 
summary(fixed_slopes)

In this model I first had problems with the error "boundary (singular) fit" (as there is nearly no variance on the group level), which is why I added the "control=glmerControl(check.conv.singular = .makeCC(action = "ignore", tol = 1e-4)), nAGQ = 100)" part.

I would be extremely grateful for any ideas as to where the models differ or why the results are different.

zx8754
  • 52,746
  • 12
  • 114
  • 209
Newbie
  • 1

0 Answers0