[R-sig-ME] simulating gam/bam model

David Villegas Ríos ch|r|eu @end|ng |rom gm@||@com
Mon Dec 14 09:13:42 CET 2020


Hi,
I have been using the *sim *function in the arm package to simulate glm
models in R and then extract random effects.

mymodel =lmer(y~x1+x2+x3+(1|ID),data=mydataset)
mysim=sim(mymodel,n.sims=1000)
simulated_raneffs=as.data.frame(mysim using ranef)

However, it seems that the *sim *function doesn´t work with additive
(gam/bam) models. Is there any alternative for simulating gam/bam models to
later extract random effects?

Thanks,
David

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list