You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use lmeresampler on my multilevel model (package nlme). I downloaded the latest version of the package via remotes::install_github("aloy/lmeresampler"). However, I get error messages. When I use na.action=omit, I get:
Error in [<-.data.frame(*tmp*, , as.character(mod.fixd[[2]]), value = c(2.77420893174699, :
replacement has 4079 rows, data has 4615
When I use na.action=exclude, I get Error in cond.var + Z %% D %% t(Z) : non-conformable arrays.
This is my model:
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within + day_cent, random=list(PP =pdNatural(~1 + day_cent)), data=Fulldata, na.action=na.omit, control=list(opt="optim"), method = "ML", correlation = corCAR1(form = ~ day_cent|PP))
summary(NA_SimpleMorningNAprediction)
And this is the code I use for bootstrap:
boot_SimpleMorningNAprediction<-bootstrap(NA_SimpleMorningNAprediction, .f=fixef, type="parametric", B=1000)
When I use a simpler model like these below, I get the same error messages.
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within, random=~1|PP, data=Fulldata, na.action=na.exclude, method = "ML")
Error in cond.var + Z %% D %% t(Z) : non-conformable arrays
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within, random=~1|PP, data=Fulldata, na.action=na.omit, method = "ML")
Error in [<-.data.frame(*tmp*, , as.character(mod.fixd[[2]]), value = c(2.77420893174699, :
replacement has 4079 rows, data has 4615
Do you know what the problem is? Is this a bug?
Unfortunately, I cannot give you the real data (due to regulations).
Best wishes,
Sanne
The text was updated successfully, but these errors were encountered:
I definitely want to get to the bottom of this. Could you use a data set similar to the one you have to share a reproducible example? I know that you can't share your data, but I am wondering if this happens with other data sets you have seen as well.
I've found an ESM dataset online (here: https://osf.io/t9gzu/) that I used to test. I receive the same issue. I converted it to R. Testdata.csv
This is the script I used now to test it.
Hi @aloy,
I am trying to use lmeresampler on my multilevel model (package nlme). I downloaded the latest version of the package via remotes::install_github("aloy/lmeresampler"). However, I get error messages. When I use na.action=omit, I get:
Error in
[<-.data.frame
(*tmp*
, , as.character(mod.fixd[[2]]), value = c(2.77420893174699, :replacement has 4079 rows, data has 4615
When I use na.action=exclude, I get Error in cond.var + Z %% D %% t(Z) : non-conformable arrays.
This is my model:
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within + day_cent, random=list(PP =pdNatural(~1 + day_cent)), data=Fulldata, na.action=na.omit, control=list(opt="optim"), method = "ML", correlation = corCAR1(form = ~ day_cent|PP))
summary(NA_SimpleMorningNAprediction)
And this is the code I use for bootstrap:
boot_SimpleMorningNAprediction<-bootstrap(NA_SimpleMorningNAprediction, .f=fixef, type="parametric", B=1000)
When I use a simpler model like these below, I get the same error messages.
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within, random=~1|PP, data=Fulldata, na.action=na.exclude, method = "ML")
Error in cond.var + Z %% D %% t(Z) : non-conformable arrays
NA_SimpleMorningNAprediction <- lme(MorningNegA ~ EveningNegA_within, random=~1|PP, data=Fulldata, na.action=na.omit, method = "ML")
Error in
[<-.data.frame
(*tmp*
, , as.character(mod.fixd[[2]]), value = c(2.77420893174699, :replacement has 4079 rows, data has 4615
Do you know what the problem is? Is this a bug?
Unfortunately, I cannot give you the real data (due to regulations).
Best wishes,
Sanne
The text was updated successfully, but these errors were encountered: