Hi all,
I've observe a behaviour of predict for 2 level nlme objects that is a bit
unexpected.
If we want to make a level 1 prediction for a 2 level nlme with newdata I
get NA
The toy example (I've got other models that haven't worked either)
library(nlme)
fm1 <- nlme(current ~ A + B * cos(w * voltage + pi/4),
data = Wafer,
fixed = list(A ~ voltage + I(voltage^2), B + w ~ 1),
random = list(Wafer = pdDiag(list(A ~ voltage + I(voltage^2),
B + w ~ 1)),
Site = pdDiag(list(A ~
voltage+I(voltage^2),
B ~ 1))),
start = c(-4.255, 5.622, 1.258,
-0.09555, 4.5679))
summary(predict(fm1,newdata=Wafer,level=1))
I'm trying to make simulations using nlme objects and if someone had a hint
on how to develop simulations from random effect distributions using nlme
objects. In my case I'm trying to assess effect of variability (my random
effects) and uncertainty on the prediction of the model.
I've found some examples of bootstrapping but they seem to work only in
perfectly balanced data (same units in all level 1, same number of samples
within level 2 cases).
https://stats.stackexchange.com/questions/232928/non-linear-mixed-model-nlme-with-nested-random-effect-do-not-know-how-to-incl
Any hint will be appreciated!
regards,
Jesus
--
[image: turn on images] <https://www.tudublin.ie/>
Jesus Maria Frias Celayeta
Professor and Academic Leader ESHI
City Campus
________________________________________
? +353 1 402 5410 ? +353 87 9697289 ? tudublin.ie
OT Baile ?tha Cliath - Environmental Sustainability and Health Institute,
Grangegorman Campus, D07 H6K8, Ireland
*This email originated from?TU?Dublin. If you received this email in error, please delete it from your system. Please note that if you are not the named addressee, disclosing, copying, distributing or taking any action based on the contents of this email or attachments is prohibited.?******* *Is ? OT Baile ?tha Cliath a th?inig an r?omhphost seo. M? fuair t? an r?omhphost seo tr? earr?id, scrios de do ch?ras ? le do thoil. Tabhair ar aird, mura t? an seola? ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon ch?ipe?il, aon d?ileadh n? ar aon ghn?omh a dh?anfar bunaithe ar an ?bhar at? sa r?omhphost n? sna hiat?in seo.* [[alternative HTML version deleted]]