0

For the lmmpower function in R, it appears the default assumption of the function is that you are measuring change over time. If I am not using data from a longitudinal study how do I change the parameters of the function. I recognize there is an argument called parameter, but what would I be able to set parameter equal to?

Here is an example using sleep study data, found in a different post about lmmpower. If I am not using data like the sleep study data found in R, which is a longitudinal study, what are ways to change the parameter?

m<- lmer (Reaction ~ Days + (Days|Subject), sleepstudy)
lmmpower(m, pct.change = 0.30, parameter = 1, t = seq(0,9), power = 0.80)
GR1818
  • 139
  • 1
  • 13
  • It's easier to help you if you provide a more specific [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Be more specific about exactly what type of model you are trying to run (explicitly give the model and the assumptions). – MrFlick Jan 22 '18 at 20:34
  • 1
    There is no "lmmpower function in R". There might be such a function in some package and sometimes packages and the main regression function in that package share a name. But we have no way of knowing that. Post code (with needed library calls) AND data ... or go home. – IRTFM Jan 22 '18 at 20:44
  • I've edited my original post to include the code I'm trying to understand. – GR1818 Jan 22 '18 at 20:58
  • I'm scratching my head wondering why you think a function designed to be used with longitudinal data has any mechanism for being used for data that is ... well, _not_ longitudinal. (Still no library call. And the `lmmpower` function in the 'longpow' package is for calculating power which is not what you were apparently looking for. Perhaps you should put a greater priority on reading the documentation?) – IRTFM Jan 22 '18 at 21:04
  • we really need more details about what you're trying to do. Here are a variety of starting points for constructing your own simulation-based power analyses: https://rpubs.com/bbolker/11703 https://peerj.com/articles/1226/ http://glmm.wikidot.com/power-analysis http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12306/full – Ben Bolker Jan 22 '18 at 21:25

0 Answers0