I'm using generalized linear mixed models from the
lme4 package to do structural equation modelling using
piecewiseSEM. It works fine when I use
glmer with gaussian, poisson or negative binomal distributions, but it throws an error when I use binomial proportional data (proportion of seedlings that survived in each plot).
These are my models, which both run fine on their own:
And when I run the SEM, this error appears:
model<-psem( seedlings2, light2 ) summary(model) |========================================================================== | 67%Error in eval(predvars, data, env) : object 'original.seedlings' not found
So perhaps piecewise SEM is not recognizing the
weights=original.seedlings argument? I've also tried running the model using cbind with columns containing the number of successes (surviving seedings) and the number of failures (dead seedlings) like this, but the same thing happens:
I've tried calling original.seedlings using d2$original.seedlings, but this doesn't help.
Is there a way to get piecewiseSEM to recognise proportional binomial models?