[R] Proportion data GAM
Rodrigo Tardin
rhtardin at gmail.com
Wed Oct 15 17:48:19 CEST 2014
Hi all,
I am not sure if this is the right place for this question or if there is
one more specific.
Anyway, I hope somebody can help me.
I am trying to run a GAM with beta distribution from mgcv package.
My dependent variable is a proportion continuously ranging from 0 to 1
(whales density) and I have three co-variates Depth, Distance to Coast and
Seabed Slope.
>From what I read, beta distribution is the most appropriate for my response
variable and not binomial.
According to mgcv manual, it is possible to specify beta distribution on a
GAM with the "betar" function, but I get the following error:
could not find function "betar"
My code is:
library(mgcv)
a2=gam(Density~s(DEPTH,k=4)+s(DISTCOAST_1,k=4)+s(SLOPE,k=4),
family=betar(link="logit"),data=misti,gamma=1.4)
The beta family is specified exactly as it is shown in the manual:
bm <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=betar(link="logit"),data=dat)
Does anyone know what it seems to be the problem?
Thanks in advance,
Rodrigo
Rodrigo Tardin
Shor Term Scholar - Duke Marine Lab. - Duke University
Doutorando em Ecologia e Evolução - IBRAG - UERJ
M.Sc em Biologia Animal - PPGBA - UFRRJ
Especialista em Docência do Ensino Superior - IAVM
Laboratório de Bioacústica e Ecologia de Cetáceos - UFRRJ/ IF/ DCA
[[alternative HTML version deleted]]
More information about the R-help
mailing list