Displaying 20 results from an estimated 9000 matches similar to: "analyzing cluster sample"
2005 Mar 11
0
mgcv 1.2-0
mgcv version 1.2 is on CRAN now. mgcv provides generalized additive models
and generalized additive mixed models with automatic estimation of the
smoothness of model components.
Changes in this version are:
* A new gam fitting method is implemented for the generalized case. It
provides more reliable convergence than the previous default, but can be
a little slower. See ?gam.method,
2005 Mar 11
0
mgcv 1.2-0
mgcv version 1.2 is on CRAN now. mgcv provides generalized additive models
and generalized additive mixed models with automatic estimation of the
smoothness of model components.
Changes in this version are:
* A new gam fitting method is implemented for the generalized case. It
provides more reliable convergence than the previous default, but can be
a little slower. See ?gam.method,
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
mgcv 1.4 is now on CRAN. It includes new features to allow mgcv::gam to fit
almost any (quadratically) penalized GLM, plus some extra smoother classes.
New gam features
-------------------------
* Linear functionals of smooths can be included in the gam linear predictor,
allowing, e.g., functional generalized linear models/signal regression,
smooths of interval data, etc.
* The parametric
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
mgcv 1.4 is now on CRAN. It includes new features to allow mgcv::gam to fit
almost any (quadratically) penalized GLM, plus some extra smoother classes.
New gam features
-------------------------
* Linear functionals of smooths can be included in the gam linear predictor,
allowing, e.g., functional generalized linear models/signal regression,
smooths of interval data, etc.
* The parametric
2012 Apr 02
1
gamm: tensor product and interaction
Hi list,
I'm working with gamm models of this sort, using Simon Wood's mgcv library:
gm<- gamm(Z~te(x,y),data=DATA,random=list(Group=~1))
gm1<-gamm(Z~te(x,y,by=Factor)+Factor,data=DATA,random=list(Group=~1))
with a dataset of about 70000 rows and 110 levels for Group
in order to test whether tensor product smooths vary across factor levels. I was wondering if comparing those two
2012 Feb 17
1
Standard errors from predict.gam versus predict.lm
I've got a small problem.
I have some observational data (environmental samples: abiotic explanatory variable and biological response) to which I've fitted both a multiple linear regression model and also a gam (mgcv) using smooths for each term. The gam clearly fits far better than the lm model based on AIC (difference in AIC ~ 8), in addition the adjusted R squared for the gam is
2011 Jun 07
2
gam() (in mgcv) with multiple interactions
Hi! I'm learning mgcv, and reading Simon Wood's book on GAMs, as recommended to me earlier by some folks on this list. I've run into a question to which I can't find the answer in his book, so I'm hoping somebody here knows.
My outcome variable is binary, so I'm doing a binomial fit with gam(). I have five independent variables, all continuous, all uniformly
2008 May 06
1
mgcv::gam shrinkage of smooths
In Dr. Wood's book on GAM, he suggests in section 4.1.6 that it might be
useful to shrink a single smooth by adding S=S+epsilon*I to the penalty
matrix S. The context was the need to be able to shrink the term to zero if
appropriate. I'd like to do this in order to shrink the coefficients towards
zero (irrespective of the penalty for "wiggliness") - but not necessarily
all the
2007 Sep 06
1
smooth functions
Hi ,
I am trying to get the estimate of smooth functions from a gam model
by in the library(gam).
What I get by constructing this model below are " edf. values ...and
p-values" for the smooths functions and intercept.
model <- gam(y~ s(height)+ s(weight)+s(time)+s(pol))
and I also get the smoothing parameters estimation by typing
coef(model).
The difficulty I am having
2009 May 05
1
A question about using “by” in GAM model fitting of interaction between smooth terms and factor
I am a little bit confusing about the following help message on how to fit a
GAM model with interaction between factor and smooth terms from
http://rss.acs.unt.edu/Rdoc/library/mgcv/html/gam.models.html:
?Sometimes models of the form:
E(y)=b0+f(x)z
need to be estimated (where f is a smooth function, as usual.) The
appropriate formula is:
y~z+s(x,by=z)
- the by argument ensures that the smooth
2008 Mar 31
1
unexpected GAM result - at least for me!
Hi
I am afraid i am not understanding something very fundamental.... and does not matter how much i am looking into the book "Generalized Additive Models" of S. Wood i still don't understand my result.
I am trying to model presence / absence (presence = 1, absence = 0) of a species using some lidar metrics (i have 4 of these). I am using different models and such .... and when i
2011 Mar 11
0
variance explained by each term in a GAM
Picking up an ancient thread (from Oct 2007), I have a somewhat more complex
problem than given in Simon Wood's example below. My full model has more than
two smooths as well as factor variables as in this simplified example:
b <- gam(y~fv1+s(x1)+s(x2)+s(x3))
Judging from Simon's example, my guess is to fit reduced models to get
components of deviance as follows:
b1 <-
2008 Jan 31
0
How to calculate Intraclass-coefficient in 2-level Linear Mixed-Effects models?
Dear R-users,
consider a 2-level linear mixed effects model (LME) with random intercept
AND random slope for level 1 AND 2. Does anybody know how to calculate
Intraclass-coefficient (ICC) for highest (innermost) level 2 ??? In the
literature, I did not find an example for these kind of komplex models.
For 1-level Random-Intercept models it would be easy:
ICC = variance due to the clustering
2012 Jul 14
1
GAM Chi-Square Difference Test
We are using GAM in mgcv (Wood), relatively new users, and wonder if anyone
can advise us on a problem we are encountering as we analyze many short time
series datasets. For each dataset, we have four models, each with intercept,
predictor x (trend), z (treatment), and int (interaction between x and z).
Our models are
Model 1: gama1.1 <- gam(y~x+z+int, family=quasipoisson) ##no smooths
Model
2005 Apr 18
0
Discrepancy between gam from gam package and gam in S-PLUS
Dear Trevor,
I've noticed a discrepancy in the degrees of freedom reported by gam() from
the gam package in R vs. gam() in S-PLUS. The nonparametric df differ by 1;
otherwise (except for things that depend upon the df), the output is the
same:
--------- snip ------------
*** From R (gam version 0.93):
> mod.gam <- gam(prestige ~ lo(income, span=.6), data=Prestige)
>
2004 Jun 16
2
gam
hi,
i'm working with mgcv packages and specially gam. My exemple is:
>test<-gam(B~s(pred1)+s(pred2))
>plot(test,pages=1)
when ploting test, you can view pred1 vs s(pred1, edf[1] ) & pred2 vs
s(pred2, edf[2] )
I would like to know if there is a way to access to those terms
(s(pred1) & s(pred2)). Does someone know how?
the purpose is to access to equation of smooths terms
2012 May 29
1
GAM interactions, by example
Dear all,
I'm using the mgcv library by Simon Wood to fit gam models with interactions and I have been reading (and running) the "factor 'by' variable example" given on the gam.models help page (see below, output from the two first models b, and b1).
The example explains that both b and b1 fits are similar: "note that the preceding fit (here b) is the same as
2011 Feb 25
1
Error: address 0x6951c20, cause 'memory not mapped'
Dear R list,
I get a strange error in R:
*** caught segfault ***
address 0x6951c20, cause 'memory not mapped'
Traceback:
1: .C("spline_eval", z$method, nu = as.integer(n), x = as.double(xout), y = double(n), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE = "stats")
2: spline(gam.data$x[, col.data], gam.smooths.all$fit[, m], xout = gam.results.global[m, ,
2010 May 28
1
Comparing and Interpreting GAMMs
Dear R users
I have a question related to the interpretation of results based on GAMMs using Simon Woods package gamm4.
I have repeated measurements (hours24) of subjects (vpnr) and one factor with three levels (pred). The outcome (dv) is binary.
In the first model I'd like to test for differences among factor levels (main effects only):
gamm.11<-gamm4(dv ~ pred +s(hours24), random = ~
2003 Jan 30
2
mgcv, gam
Hola!
I have some problems with gam in mgcv. Firts a detail: it would
be nice igf gam would accept an na.action argument, but that not the
main point.
I want to have a smooth term for time over a year, the same pattern
repeating in succesive years. It would be natural then to impose
the condition s(0)=s(12). Is this possible within mgcv?
I tried to obtain this with trigonometric terms, aca: