Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with specifying integral form for cumulative effects model #26

Closed
agstone90 opened this issue Dec 16, 2020 · 3 comments
Closed

Comments

@agstone90
Copy link

Hi Dr. Rizopoulos, thanks again for all the help!

I am trying to fit a cumulative effects model based on the following lme object

<lme_fit<-lme(var~ns(time,3)+cov,random=~time|ID,
data=data,control=lmeControl(opt="optim"))>

I haven't been able to get the derivForm argument right though. I've been trying

<iform<-list(fixed=-1+time+ins(time,3)+(cov*time),indFixed=c(1:5),
random=
-1+time+time^2/2,indRandom=c(1:2))>

and getting an error "Error in terms.formula(derivForm$random) : invalid model formula in ExtractVars"

Would you be able to provide any guidance as to what the correct syntax would be?

Thanks!

@agstone90
Copy link
Author

Sorry, not sure how I've managed to strikethrough my iform. It should read

iform<-list(fixed=-1+time+ins(time,3)+(cov*time),indFixed=c(1:5),
random=
-1+time+time^2/2,indRandom=c(1:2))

@drizopoulos
Copy link
Owner

drizopoulos commented Dec 16, 2020 via email

@agstone90
Copy link
Author

Thanks! Managed to delete it when copy/pasting code, but adding an I() operation got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants