[R-sig-ME] Simulation of nlme models
Jesus Maria Frias Celayeta
je@u@@|r|@@ @end|ng |rom d|t@|e
Wed Jul 3 14:39:54 CEST 2019
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]]
More information about the R-sig-mixed-models
mailing list