I just started using DataSHIELD. The purpose is to evaluate the possibility to use DataSHIELD in our upcoming medical research. Do do so I am trying to do a linear mixed model analysis.
My code looks like this:
tryCatch(
{
m1 <- ds.lmerSLMA(
formula = "Var1 ~ Time * Group + (1|ID)",
data = "D_Supine",
datasources = conns,
newobj = "m1"
)
}, error = function(e) {
print(e)
print(datashield.errorMessages())
}
)
My questions:
Are there any good tutorials on doing lmer analysis with DataSHIELD?
How could I calculate contrasts etc using the object DataSHIELD returns?
thank you for the excellent video and the work you put into dsHelper!
I get it to work when my Month and Group variable are continues, but not when they are factors. It works when I run my “normal R code“ using lme4 Any tips for that?
My “preferred code“ look something like this. If the factors Months and Groups are continues they work fine.
Error in `select()`:
ℹ In argument: `all_of(coef_names)`.
Caused by error in `all_of()`:
! Can't subset elements that don't exist.
✖ Elements `MonthGroup12`, `MonthGroup24`, `MonthGroup3`, `MonthGroup48`, `MonthGroup6`, etc. don't exist.
Run `rlang::last_trace()` to see where the error occurred.
I tried your example and it works fine for me without any errors. The only thing I changed was the uploading of the data as a .csv file instead of .rds, but I don’t think this is the reason of the error.
Do you want to join our next drop-in session on Wednesday at 10am CET (Launch Meeting - Zoom) to have a look together?
Hej Demetris, thank you for your reply. Currently I am trying to get my Docker Environment up and running again (on a ARM Mac) after my old computer resigned. As soon as it works I will join one of the meetings.