fit <- lme(frailty_index ~ age, random = ~age | id, = moddat, method = 'ML')
But when i run powerSim, like so:
power <- powerSim(fit, nsim = 5, test = fixed("age"))
I get 0% power and the following cryptic output from lastResult()$errors:
stage index message
1 Fitting 1 replacement has 2 rows, data has 55899
2 Fitting 2 replacement has 2 rows, data has 55899
3 Fitting 3 replacement has 2 rows, data has 55899
4 Fitting 4 replacement has 2 rows, data has 55899
5 Fitting 5 replacement has 2 rows, data has 55899
so i'm using lme to fit my model, like so:
fit <- lme(frailty_index ~ age, random = ~age | id, = moddat, method = 'ML')
But when i run
powerSim
, like so:power <- powerSim(fit, nsim = 5, test = fixed("age"))
I get 0% power and the following cryptic output from
lastResult()$errors
:stage index message 1 Fitting 1 replacement has 2 rows, data has 55899 2 Fitting 2 replacement has 2 rows, data has 55899 3 Fitting 3 replacement has 2 rows, data has 55899 4 Fitting 4 replacement has 2 rows, data has 55899 5 Fitting 5 replacement has 2 rows, data has 55899
Hard to debug when it's not clear what this means