I am currently experiencing an issue trying to run the R output of MLPowSim, 'powersimu.r'. When performing a power analysis for a 1-level model (e.g. the one outlined in the manual section one, p8), the script runs perfectly.
However, I am now trying to replicate the example outlined in the manual section 5.1 (on p113) for R. The R script is generated by MLPowSim, but when running it, I get the error "Error in lmer(modelformula, data, method="ML") : unused argument (method = "ML").
I have tried requesting REML instead, and have tried to change some other parameters deviating from the example given in the manual, but so far I am unsuccessful in bypassing this error message.
I have R version R-3.6.3 installed and running on a Windows platform. Any suggestions as to solving this problem would be highly appreciated!
Issue running MLPowSim in R
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Issue running MLPowSim in R
What happens if you just remove the method="ML" statement from the command? i.e.:
If that doesn't make a difference could you post the associated generated R code?
Code: Select all
lmer(modelformula, data)
Re: Issue running MLPowSim in R
Thank you for your suggestion - in the meantime, I'd concluded that the lmer function has been updated relatively recently, and the argument 'method=' is no longer a valid argument to the function. Removing the argument works, but will run the default for the function. From R documentation, I conclude that the argument 'REML=TRUE/FALSE' should allow to specify the method.