The two distributions are different. The random effect is assumed to
be a Gaussian random variable, just as it is with the GLMMs in the
lme4 package. It is fine to use such a random effect within a GAM with
a non-Gaussian error distribution, like the ones you describe using.
HTH
Gavin
On 3 Febru
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?
Hi Simon,
many thanks for looking into this and making me understand the problem!
I'll adjust my factor levels right away...
Best, Katharina
On 3 February 2014 12:42, Simon Wood wrote:
> Hi Katharina,
>
> Thanks for sending this.
>
> The problem is that the prediction data for site contain leve
Hi Katharina,
Thanks for sending this.
The problem is that the prediction data for site contain levels not
available in the (useable non-NA) fit data...
> levels(m$model$site)
[1] "KRB" "NP.FOR" "WKS.FRE" "WKS.KRE" "WKS.RIE" "WKS.WUE"
> levels(gapData$site)
[1] "KRB" "NP.FOR" "RIE.2"
I suppose there may be an error of sorts, but have you considered
the fact that solving the error might not gain you admittance into
heaven? Look at the RHS of the model:
sensor2 + s(site, bs = "re")
... and think about the fact that you are "smoothing" a factor
variable.
- Actually this is
On Feb 2, 2014, at 9:52 AM, Katharina May wrote:
> Hi Simon,
>
> thank you for your reply, I really appreciate any help to understand
> the problem here...
> Unluckily the package upgrade didn't help with this issue.
> An example reproducing the error, and a current sessionInfo() Output
> can be
Hi Simon,
thank you for your reply, I really appreciate any help to understand
the problem here...
Unluckily the package upgrade didn't help with this issue.
An example reproducing the error, and a current sessionInfo() Output
can be found below.
Many thanks once again,
Katharina
R Code
Hi Katharina,
Could you try upgrading to mgcv_1.7-28, please? There was an occasional
problem to do with matching factor levels, which is fixed, but I'm not
very confident that is what is going on.
If upgrading doesn't work, is there any chance you could send me a small
example dataset and c
Dear R-Community,
I`m trying to apply the mgcv package to fill gaps in sensor data from
different sites (9 sites, 2 sensors per site) and do the filling on a
site-wise level.
Based on
http://r.789695.n4.nabble.com/mgcv-gamm-predict-to-reflect-random-s-effects-td3622738.html
my model looks like th
On Fri, 2010-06-04 at 15:56 +0200, Joris Meys wrote:
> Dear all,
>
> I'm a bit stunned by the behaviour of a gam model using cyclic
> P-spline smoothers. I cannot provide the data, as I have about 61.000
> observations from a time series.
>
> I checked the help files ?smooth.terms, and found ab
Dear all,
I'm a bit stunned by the behaviour of a gam model using cyclic
P-spline smoothers. I cannot provide the data, as I have about 61.000
observations from a time series.
I use the following model :
testgam <- gam(NO~s(x)+s(y,bs="cs")+s(DD,bs="cs")+s(TT),data=Final)
The problem lies with t
Thank you for your answer !
Actually I'm doing an internship about GAM for mid-term french load forecasting
(at "EDF", Electricité De France). I'm working with your book and I was asked
to simulate data on my own, in order to see if gam (from mgcv) gave good
estimations of the functions I had
Amandine,
The coefficients of the splines are in the `coefficients' part of the fitted
`gam' object, but what they mean depends on what basis you used Chapter 4
of Wood S.N. (2006) Generalized Additive Models: An Introduction with R.
Chapman and Hall/CRC Press, gives the details for all the
Hello ! I am working on generalized additive models using the package mgcv, and
I would like to know where I could find information about the estimated splines
so I could reconstruct the full function instead of just having values at given
points (with predict.gam, type="terms") ? Thanks in adv
14 matches
Mail list logo