m-clark/mixedup

extract_random_effect did not yield confidence intervals for nlme object

tapirus07 opened this issue · 2 comments

mixedup::extract_random_efects does not report condfidence intervals for nlme object. It is not working for nonlinear models even though the documentation inform that fucntion can handle with this objects.

mod=nlme(yAsym/exp((xmid-x)/scal),
data=data,
fixed = Asym+xmid+scal ~ 1,
random = Asym+xmid+scal
1|country,
)

extract_random_effect(mod)
group_var effect group value

1 country Asym Afghanistan -13353.
2 country Asym Algeria -11859.
3 country Asym Andorra -5100.
4 country Asym Argentina 337.
5 country Asym Armenia -4778.
6 country Asym Australia -7036.
7 country Asym Austria 1543.
8 country Asym Azerbaijan -11756.
9 country Asym Bahrain -13132.
10 country Asym Belarus -12661.

... with 275 more rows

Any alternative or solution?

There are no intervals for random effects for nlme, because it doesn't provide even a standard error to calculate them with. In the helpfile for extract_random_effects it states "The nlme package only provides the estimated random effect parameters, not their uncertainty, so it isn't provided."

The brms package may be able to do this type of model for you, at which point you should be able to get the interval estimate from extract_random_effects.

Going ahead and closing as the function is working as documented, but feel free to post if something else is amiss.