Dear Simon, your note below says "bs="re" specifies a Gaussian random effect ". I have been using bs = "re" for data modeled with Poisson and binomial distributions, or variants thereof (e.g., quasi-Poisson). Have I erred in assuming bs ="re" can be used to obtain random effects for such data? Will Shadish

- Actually this is ok. mgcv exploits the duality between quadratically
penalized smooths and Gaussian random effects to allow random effects to
be specified this way. bs="re" specifies a Gaussian random effect with
corresponding model matrix given by model.matrix(~site-1). (More
generally s(x,y,z,bs="re") specifies a gaussian random effect with model
matrix given by model.matrix(~x:y:z-1), with obvious generalization to
more or fewer variables). See mgcv help file ?random.effects for more.

best,
Simon


--
William R. Shadish
Distinguished Professor
Founding Faculty

Mailing Address:
William R. Shadish
University of California
School of Social Sciences, Humanities and Arts
5200 North Lake Rd
Merced CA  95343

Physical/Delivery Address:
University of California Merced
ATTN: William Shadish
School of Social Sciences, Humanities and Arts
Facilities Services Building A
5200 North Lake Rd.
Merced, CA 95343

209-228-4372 voice
209-228-4007 fax (communal fax: be sure to include cover sheet)
wshad...@ucmerced.edu
http://faculty.ucmerced.edu/wshadish/index.htm
http://psychology.ucmerced.edu

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to