Displaying 20 results from an estimated 10000 matches similar to: "predicted values in mgcv gam"
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:
2005 Oct 05
3
testing non-linear component in mgcv:gam
Hi,
I need further help with my GAMs. Most models I test are very
obviously non-linear. Yet, to be on the safe side, I report the
significance of the smooth (default output of mgcv's summary.gam) and
confirm it deviates significantly from linearity.
I do the latter by fitting a second model where the same predictor is
entered without the s(), and then use anova.gam to compare the
2005 Sep 26
4
p-level in packages mgcv and gam
Hi,
I am fairly new to GAM and started using package mgcv. I like the
fact that optimal smoothing is automatically used (i.e. df are not
determined a priori but calculated by the gam procedure).
But the mgcv manual warns that p-level for the smooth can be
underestimated when df are estimated by the model. Most of the time
my p-levels are so small that even doubling them would not result
2006 Mar 23
1
gam y-axis interpretation
Sorry if this is an obvious question...
I'm estimating a simple binomial generalized additive model using the
gam function in the package mgcv. The model makes sense given my data,
and the predicted values also make sense given what I know about the
data.
However, I'm having trouble interpreting the y-axis of the plot of the
gam object. The y-axis is labeled "s(x,2.52)"
2018 Jan 17
1
mgcv::gam is it possible to have a 'simple' product of 1-d smooths?
I am trying to test out several mgcv::gam models in a scalar-on-function regression analysis.
The following is the 'hierarchy' of models I would like to test:
(1) Y_i = a + integral[ X_i(t)*Beta(t) dt ]
(2) Y_i = a + integral[ F{X_i(t)}*Beta(t) dt ]
(3) Y_i = a + integral[ F{X_i(t),t} dt ]
equivalents for discrete data might be:
1) Y_i = a + sum_t[ L_t * X_it * Beta_t ]
(2) Y_i
2010 Aug 05
1
plot points using vis.gam
Hello,
I'm trying to illustrate the relationships between various trait and
environment data gathered from a number of sites. I've created a GAM to do
this: gam1=gam(trait~s(env1)+s(env2)+te(env1,env2)) and I know how to create
a 3D plot using vis.gam. I want to be able to show points on the 3D plot
indicating the sites that the data came from. I can do this on a 2D plot
when there is one
2007 Dec 13
1
Probelms on using gam(mgcv)
Dear all,
Following the help from gam(mgcv) help page, i tried to analyze my
dataset with all the default arguments. Unfortunately, it can't be run
successfully. I list the errors below.
#m.gam<-gam(mark~s(x,y)+s(lstday2004)+s(slope)+s(ndvi2004)+s(elevation)+s(disbinary),family=binomial(logit),data=point)
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
2006 Feb 13
2
transforming data frame for use with persp
Hi,
This is probably documented, but I cannot find the right words or
expression for a search. My attempts failed.
I have a data frame of 3 vectors (x, y and z) and would like to
transform this so that I could use persp. Presently I have y-level
copies of each x level, and a z value for each x-y pair. I need 2
columns giving the possible levels of x and y, and then a
transformation of
2005 Feb 27
1
prediction, gam, mgcv
I fitted a GAM model with Poisson distribution
using the function gam() in the mgcv package.
My model is of the form:
mod<-gam(y~s(x0)+s(x1)+s(x2),family=poisson).
To extract estimates at a specified set of covariate
values I used the gam `predict' method.
But I want to get
estimate and standard error of the difference of two fitted values.
Can someone explain what should I do?
Thank
2012 May 08
2
mgcv: inclusion of random intercept in model - based on p-value of smooth or anova?
Dear useRs,
I am using mgcv version 1.7-16. When I create a model with a few
non-linear terms and a random intercept for (in my case) country using
s(Country,bs="re"), the representative line in my model (i.e.
approximate significance of smooth terms) for the random intercept
reads:
edf Ref.df F p-value
s(Country) 36.127 58.551 0.644
2003 Jan 07
1
help interpreting output?
Dear R experts,
I'm hoping someone can help me to interpret the results of building
gam's with mgcv in R.
Below are summaries of two gam's based on the same dataset. The first
gam (named "gam.mod") has six predictor variables. The second gam
(named "gam.mod2") is exactly the same except it is missing one of the
predictor variables. What is confusing me is
2009 Oct 13
1
vis.gam() contour plots
Greetings,
I have what I hope is a simple question. I would like to change my
contour interval on the vis.gam( plot.type="contour") in the mgcv
package. Is this a situation where I need to modify the function or is
there a default value I can change?
Thanks
2006 Feb 05
1
how to extract predicted values from a quantreg fit?
Hi,
I have used package quantreg to estimate a non-linear fit to the
lowest part of my data points. It works great, by the way.
But I'd like to extract the predicted values. The help for
predict.qss1 indicates this:
predict.qss1(object, newdata, ...)
and states that newdata is a data frame describing the observations
at which prediction is to be made.
I used the same technique I used
2018 Mar 04
2
Random effect in GAM (mgcv)
Dear R users,
I am using the *mgcv package* to model the ratio of hectares of damaged
culture by wild boar in french departments according to some
environmental covariates. I used a _Beta distribution_ for the response.
For each department, we estimated the damaged in 3 different culture
types (??Culture??). Our statistical individual are therefore the
department crossed by the culture
2010 Aug 30
1
'mgcv' package, problem with predicting binomial (logit) data
Dear R-help list,
I?m using the mgcv package to plot predictions based on the gam function.
I predict the chance of being a (frequent) participant at theater plays vs.
not being a participant by age.
Because my outcome variable is dichotomous, I use the binomial family with
logit link function.
Dataset in attachment, code to read it in R:
data <- read.spss("pas_r.sav")
attach(data)
2007 Dec 13
1
Two repeated warnings when runing gam(mgcv) to analyze my dataset?
Dear all,
I run the GAMs (generalized additive models) in gam(mgcv) using the
following codes.
m.gam
<-gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbinary,family=binomial(logit),data=point)
And two repeated warnings appeared.
Warnings$B!'(B
1: In gam.fit(G, family = G$family, control = control, gamma = gamma, ... :
Algorithm did not converge
2: In gam.fit(G,
2008 Jun 11
1
mgcv::gam error message for predict.gam
Sometimes, for specific models, I get this error from predict.gam in library
mgcv:
Error in complete.cases(object) : negative length vectors are not allowed
Here's an example:
model.calibrate <-
gam(meansalesw ~ s(tscore,bs="cs",k=4),
data=toplot,
weights=weight,
gam.method="perf.magic")
> test <- predict(model.calibrate,newdata)
Error in
2012 Feb 03
1
GAM (mgcv) warning: matrix not positive definite
Dear list,
I fitted the same GAM model using directly the function gam(mgcv) ... then
as a parameter of another function that capture the warnings messages (see
below).
In the first case, there is no warning message printed, but in the last
one, the function find two warning messages stating "matrix not positive
definite"
So my question is: Do I have to worry about those warnings and
2009 Mar 24
2
help: what are the basis functions in {mgcv}: gam?
I am writing my thesis with the function gam(), with the package {mgcv}.
My command is: gam(y~s(x1,bs="cr")+s(x2, bs="cr")).
I need help to know what are the default basis funcitons for gam. I have not
found any detailed reference for this.
Can anyone help me with this??
--
View this message in context: