search for: sw283

Displaying 20 results from an estimated 166 matches for "sw283".

2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL: http://people.bath.ac.uk/sw283/mgcv/) shows a general equation log{E(yi )} = ?+ ?xi + f (zi ) . What I would like to do is put my model coefficients and present the equation used. I am an ecologist not a statistician - and have no access to statistical advice. How would I use values from the model below to complete the equation:...
2006 Jun 24
3
getting the smoother matrix from smooth.spline
Can anyone tell me the trick for obtaining the smoother matrix from smooth.spline when there are non-unique values for x. I have the following code but, of course, it only works when all values of x are unique. ## get the smoother matrix (x having unique values smooth.matrix = function(x, df){ n = length(x); A = matrix(0, n, n); for(i in 1:n){ y = rep(0, n); y[i]=1; yi =
2007 Oct 02
3
mcv package gamm function Error in chol(XVX + S)
Hi all R users ! I'm using gamm function from Simon Wood's mgcv package, to fit a spatial regression Generalized Additive Mixed Model, as covariates I have the geographical longitude and latitude locations of indexed data. I include a random effect for each district (dist) so the code is fit <- gamm(y~s(lon,lat,bs="tp", m=2)+offset(log(exp.)), random=list(dist=~1),
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
...or adding user defined smooths has been modified and simplified. See ?smooth.construct. A fuller list of changes is at http://cran.r-project.org/web/packages/mgcv/ChangeLog -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 ------------------------------------------------------- -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 _______________________________________________ R-packages mailing list R-packages at r-project.org https://s...
2008 Jun 09
0
Fwd: mgcv 1.4 on CRAN
...or adding user defined smooths has been modified and simplified. See ?smooth.construct. A fuller list of changes is at http://cran.r-project.org/web/packages/mgcv/ChangeLog -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 ------------------------------------------------------- -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 _______________________________________________ R-packages mailing list R-packages at r-project.org https://s...
2006 Apr 11
1
gaussian family change suggestion
...lse if (family$link=="inverse") { iy <- y==0 if (sum(iy)) mustart[iy] <- min(abs(y[!iy]))*.5 } }) best, Simon >- Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY >- +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/
2011 Jan 14
1
naresid.exclude query
...ucting all NA object ... so I guess I'm really asking if there is any chance of fixing this soon, or whether I should just code up a work-around for predict.gam? Simon -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL, I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW. I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12. M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0)) THIS IS THE ERROR MESSAGE Error in `*tmp*`[[k]] : attempt to
2011 Nov 09
2
Problem with simple random slope in gam and bam (mgcv package)
Dear useRs, This is the first time I post to this list and I would appreciate any help available. I've used the excellent mgcv package for a while now to investigate geographical patterns of language variation, and it has has always worked without any problems for me. The problem below occurs using R 2.14.0 (both 32 and 64 bit versions in Windows and the 64 bit version in Unix) and mgcv (both
2012 Feb 13
3
mgcv: increasing basis dimension
hi Using a ts or tprs basis, I expected gcv to decrease when increasing the basis dimension, as I thought this would minimise gcv over a larger subspace. But gcv increased. Here's an example. thanks for any comments. greg #simulate some data set.seed(0) x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) linp<--1+x1+0.5*x2+0.3*exp(-2*d)*sin(10*d)*x3
2011 Jul 19
2
Incorrect degrees of freedom for splines using GAMM4?
Hello, I'm running mixed models in GAMM4 with 2 (non-nested) random intercepts and I want to include a spline term for one of my exposure variables. However, when I include a spline term, I always get reported degrees of freedom of less than 1, even when I know that my spline is using more than 1 degree of freedom. For example, here is the code for my model: >
2007 Oct 09
2
Help with gamm errors
Dear All Hopefully someone out there can point out what I am missing! I have a (large, several hundred) dataset of gardens in which over two years the presence/absence of a particular bird species is noted each week. I have good reason to believe there is a difference between the two years in the weekly proportion of gardens and would like to assess this, before going on to look in more detail at
2009 Mar 04
0
mgcv 1.5-0
...family has been added. * `gam.method' has been replaced (see arguments `method' and `optimizer' for `gam') For other changes see the changeLog. Simon -- > Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283 _______________________________________________ R-packages mailing list R-packages at r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages
2006 Jun 20
1
Comparing partial response curves from GAM
Hello all, I was wondering if anyone is aware of formal approaches and tools for comparing partial response curves produced in GAM? My interest is in determining if two partial response curves are "statistically" different. I recognize that point-wise standard error estimates can be produced using the GAM package but Im not certain how to translate this into a statistical test for the
2006 Nov 14
2
gam() question
Hi everyone, I am fitting a bivariate smoothing model by using gam. But I got an error message like this: "Error in eigen(hess1, symmetric = TRUE) : 0 x 0 matrix" If anyone know how to figure it out, pleaselet me know. Thanks very much. [[alternative HTML version deleted]]
2007 Apr 02
2
How to choose the df when using GAM function?
Dear all, When using GAM function in R, we need to specify the degree of freedom for the smooth function (i.e. s=(x, df=#)). I am wondering how to choose an appropriate df. Thanks a lot, Jin ---- North Carolina State University USA --------------------------------- [[alternative HTML version deleted]]
2007 Apr 16
1
Does the smooth terms in GAM have a functional form?
Hi, all, Does anyone know how to get the functional form of the smooth terms in GAM? eg. I fit y=a+b*s(x) where s is the smooth function. After fitting this model with GAM in R, I want to know the form of the s(x). Any suggestion is appreciated. Thanks, Jin --------------------------------- Ahhh...imagining that irresistible "new car" smell?
2007 Apr 17
1
value of complexity parameter in ridge regression
Hi, What is the optimum range to look for a value of lambda while doing ridge regression. Can/ should lambda be greater than 1 ? I have conflicting (or what appears conflicting to me) sources that use lambda >= 0, without any upper limit, but that makes the search space infinite.. right ?? So, perhaps my question is: is there an upper limit to lambda. Does the value of lambda convey
2007 Nov 25
1
GAM with constraints
Hi, I am trying to build GAM with linear constraints, for a general link function, not only identity. If I understand it correctly, the function pcls() can solve the problem, if the smoothness penalties are given. What I need is to incorporate the constraints before calculating the penalties. Can this be done in R? Any help would be greately appreciated. -- View this message in context:
2007 Dec 26
1
Cubic splines in package "mgcv"
R-users E-mail: r-help@r-project.org My understanding is that package "mgcv" is based on "Generalized Additive Models: An Introduction with R (by Simon N. Wood)". On the page 126 of this book, eq(3.4) looks a quartic equation with respect to "x", not a cubic equation. I am wondering if all routines which uses cubic splines in mgcv are based on this quartic