0
$\begingroup$

I am currently trying to fit a GLM to to describe the following data with both random slopes and intercepts: data

The following code with no random slope works:

PQL <- glmmPQL(TorqueT ~ twist, random = ~ 1| BrainID, family = gaussian(link = "log"), data = Cplane)

summary(PQL)

And provides the appropriate output however when I attempt to incorporate random slopes with the following code:

PQL <- glmmPQL(TorqueT ~ twist, random = ~ twist| BrainID, family = gaussian(link = "log"), data = Cplane)

I receive the following error:

iteration 1

iteration 2

Error in chol.default((value + t(value))/2) : the leading minor of order 2 is not positive definite

In addition: Warning messages:

1: In doTryCatch(return(expr), name, parentenv, handler) : display list redraw incomplete

2: In doTryCatch(return(expr), name, parentenv, handler) : invalid graphics state

3: In doTryCatch(return(expr), name, parentenv, handler) : invalid graphics state

If anybody has any suggestions on how to rectify this I would be very grateful.

*Edit1: I have changed the name of the dataset variable to BrainID

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.