Error in one model but not another

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Error in one model but not another

Postby susanna.glass » Tue Oct 04, 2022 2:12 pm

Hi all, I am brand new to using RMark and have never used Mark, so my problem may seem simple but I really have no idea how to solve it. I have created my known fate design data with 3 individual-specific covariates (MCL, Weight, and Treatment) and 3 time-varying covariates (PDSI, Precipitation, and Maximum Temperature). When I processed my data I also used "Treatment" as the grouping variable. I am trying to run models with various covariate combinations, and some work while others do not. One model I would like to run that is not working is ~MCL + Treatment. When I run the covariate MCL or Treatment by themselves or with a different covariate it work just fine, but when I run them together, I get the following error:
Code: Select all
> MCL_Treat <- mark(data.processed,ddl = data.ddl,
+                   model = "Known",
+                   model.parameters = list("S" = list(formula = ~ MCL + Treatment)))
Error in str2lang(x) : <text>:1:18: unexpected symbol
1: ~TreatmentDirect Release
                     ^
Error in mark(data.processed, ddl = data.ddl, model = "Known", model.parameters = list(S = list(formula = ~MCL +  :
  Misspecification of model or internal error in code


I have tried to no avail to look for a solution online and in this forum. If anyone can help or point me to a resource I would greatly appreciate it! Thanks.
susanna.glass
 
Posts: 1
Joined: Tue Sep 27, 2022 10:36 am

Re: Error in one model but not another

Postby jlaake » Fri Oct 07, 2022 9:21 am

I worked with Susanna offlist and discovered the problem was a blank within the Treatment group name (Direct Release). This can likely be fixed but for the time being don't use blanks in labels for groups. She just replaced the blank with an underscore and it all worked.

--jeff
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 21 guests