Hello, I have developed this model to test change in PTFines6 over time. I have random effects of watershed (HUC3) and management type (mgmt3), and then I have the YrC/SiteID random effect which is the longitudinal time effect. But I recently found out that I need to incorporate a compound correlation structure. I found examples of this where there is just one random effect, but not my case where I have multiple. I am not sure if I just include YrC|SiteID or the entire random effect. I have tried both, and get error messages: Original code:
model5.15_e=lme(PTFines6~HUC3 + YrC*mgmt3 + Bf* mgmt3 + LnGrad * mgmt3+ Precip ,random=list( ~1|HUC3,~1|mgmt3,1~(YrC)|SiteID),na.action=na.omit, data=habitat2,method="REML",control=control1) #22835 no precip interaction I have tried: model5.15_e=lme(PTFines6~HUC3 + YrC*mgmt3 + Bf* mgmt3 + LnGrad * mgmt3+ Precip ,random=list( ~1|HUC3,~1|mgmt3,1~(YrC)|SiteID),na.action=na.omit, data=habitat2, correlation=corCompSymm(form=1~(YrC)|SiteID),method="REML",control=control1) #22835 no precip interaction I get the message: incompatible formulas for groups in "random" and "correlation" I have tried: model5.15_e=lme(PTFines6~HUC3 + YrC*mgmt3 + Bf* mgmt3 + LnGrad * mgmt3+ Precip ,random=list( ~1|HUC3,~1|mgmt3,1~(YrC)|SiteID),na.action=na.omit, data=habitat2, correlation=corCompSymm(form=~1|HUC3,~1|mgmt3,1~(YrC)|SiteID),method="REML",control=control1) #22835 no precip interaction I get the error message "non-numeric argument to mathematical function Thanks for any help. Christy Meredith This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.