Page 1 of 1

Error in one model but not another

PostPosted: Tue Oct 04, 2022 2:12 pm
by susanna.glass
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.

Re: Error in one model but not another

PostPosted: Fri Oct 07, 2022 9:21 am
by jlaake
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