Re: [R] prediction using gam

2007-08-08 Thread Simon Wood
, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] plotting gam models

2007-07-25 Thread Simon Wood
: Henrique Dallazuanna [mailto:[EMAIL PROTECTED] Enviado el: martes, 24 de julio de 2007 13:36 Para: Lucia Zarauz CC: r-help@stat.math.ethz.ch Asunto: Re: [R] plotting gam models see ?predict.gam -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603

Re: [R] plotting gam models

2007-07-24 Thread Simon Wood
-- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] gam function in the mgcv library

2007-06-25 Thread Simon Wood
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch mailing

Re: [R] two basic question regarding model selection in GAM

2007-06-22 Thread Simon Wood
/AIC/UBRE criterion? Yes (assuming you're not using neg bin with unknown theta). But are the models very different? simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R

Re: [R] mgcv: lowest estimated degrees of freedom

2007-06-22 Thread Simon Wood
product penalties. So, with high enough smoothing parameters, the term will be shrunk to zero (and hence have zero EDF). Simon Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R

Re: [R] interpretation of F-statistics in GAMs

2007-06-22 Thread Simon Wood
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood

Re: [R] How to compare GLM and GAM models

2007-06-20 Thread Simon Wood
selection, but bearing in mind that in that case it's an approximation without good supporting theory, best, Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help

Re: [R] GLM dist Gamma-links identity and inverse

2007-06-17 Thread Simon Wood
_ Receba GR�TIS as mensagens do Messenger no seu celular quando voc� estiver offline. Conhe�a o MSN Mobile! [[alternative HTML version deleted]] -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603

Re: [R] comparing fit of cubic spline

2007-05-30 Thread Simon Wood
mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603

Re: [R] value of complexity parameter in ridge regression

2007-04-18 Thread Simon Wood
do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] Does the smooth terms in GAM have a functional form?

2007-04-16 Thread Simon Wood
mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603

Re: [R] Use estimated non-parametric model for sensitivity analysis

2007-04-16 Thread Simon Wood
do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] Relative GCV - poisson and negbin GAMs (mgcv)

2007-04-13 Thread Simon Wood
Seattle, WA __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood

Re: [R] Testing additive nonparametric model

2007-04-04 Thread Simon Wood
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603

Re: [R] How to choose the df when using GAM function?

2007-04-03 Thread Simon Wood
GCV or (generalized) AIC. Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] interactions and GAM

2007-03-01 Thread Simon Wood
Don't know if this helps, but... gam in package mgcv will let you set up smooths that interact with factors using the `by' variable mechanism. See ?gam.models, particularly the last example. Prediction is supported. Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2

Re: [R] Help on GAM

2007-03-01 Thread Simon Wood
with something like te(x,z) then the effect of the response could be positive or negativedepending on the values of x and z. Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] DF for GAM function (mgcv package)

2007-01-12 Thread Simon Wood
of the covariance turns out to be 9. In Simon Wood's book, the rank of covariance matrix is usually either 9 or 99 (pages 239-230 and 259). Can anyone comment on why so many smooth terms have a denominator degree of freedom involving 9. Simon Wood writes r is usually determinted numerically, while

Re: [R] GAM model selection and dropping terms based on GCV

2006-12-04 Thread Simon Wood
like GCV, AIC, confidence interval coverage and approximate p-values for guidance, but not as the basis for rules... modelling context has to play a part as well. Sorry if that's all a bit vague. Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225

Re: [R] package mgcv, command gamm

2006-12-04 Thread Simon Wood
/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] GAMS and Knots

2006-11-29 Thread Simon Wood
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University

Re: [R] gam() question

2006-11-15 Thread Simon Wood
I'll try and get uploaded to CRAN today. Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] solve computationally singular

2006-11-09 Thread Simon Wood
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood

Re: [R] gamm(): nested tensor product smooths

2006-11-08 Thread Simon Wood
. -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University

Re: [R] Fitting generalized additive models with constraints?

2006-09-06 Thread Simon Wood
? If you do then it removes the ambiguity in the model, and makes everything a bit easier. best, Simon -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283 __ R-help@stat.math.ethz.ch

Re: [R] Fitting generalized additive models with constraints?

2006-09-05 Thread Simon Wood
]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical

Re: [R] glmmPQL question!

2006-08-17 Thread Simon Wood
/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] Grasper model error

2006-08-16 Thread Simon Wood
/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] Geometrical Interpretation of Eigen value and Eigen vector

2006-08-10 Thread Simon Wood
]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood

Re: [R] Calculate x-values from a spline

2006-07-28 Thread Simon Wood
/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44 1225 386603 www.maths.bath.ac.uk/~sw283

Re: [R] equality constraint

2006-07-22 Thread Simon Wood
constrOptim only fits inequality constraints. Is there an alternative to lead with this problem? - Any reason not to just replace e.g. parameter 8 with minus the sum of parameters 5, 6, and 7? best, Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44

Re: [R] gamm

2006-07-19 Thread Simon Wood
6.252755 0. Xs(x0)Fx1-0.325 0.1028794 392 -0.000316 0.9997 Xs(x1)Fx1 0.3831694 0.0957323 392 4.002509 0.0001 Xs(x2)Fx1 1.4584330 0.3909237 392 3.730736 0.0002 Xs(x3)Fx1-0.0123951 0.0143162 392 -0.865809 0.3871 Correlation: Hope that's some use. Simon - Simon Wood

Re: [R] mgcv::gam error message

2006-07-19 Thread Simon Wood
Could anyone please tell me what to do to resolve this error message? - Any chance you could send me some code (and associated data) that I can cut and paste in order to chase this up? Whatever's wrong here, `gam' should probably pick it up before things get this far, but I can't tell what's

Re: [R] getting the smoother matrix from smooth.spline

2006-07-01 Thread Simon Wood
matrix. Perhaps this could be developed into a spline smooth method for model.matrix and included in R. On 6/30/06, Simon Wood [EMAIL PROTECTED] wrote: 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 = predict

Re: [R] getting the smoother matrix from smooth.spline

2006-06-30 Thread Simon Wood
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 = predict(smooth.spline(x, y, df=df),x)$y; A[,i]= yi; } (A+t(A))/2; } - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY

Re: [R] GAM selection error msgs (mgcv gam packages)

2006-06-21 Thread Simon Wood
to the number of distinct points, or fewer. - Finally, for speed reasons, I'd use the cr basis (see ?s) if doing this. best, Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/ Thanks Savrina *mgcv

Re: [R] Comparing partial response curves from GAM

2006-06-21 Thread Simon Wood
Can you give a bit more information on exactly what you want to compare? (maybe give example models). There are ways of comparing curves, but it is a bit context dependent. - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603

Re: [R] gamm error message

2006-06-21 Thread Simon Wood
should ignore the reported r^2. best, Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/ On Tue, 6 Jun 2006, Highland Statistics Ltd. wrote: Hello, Why would I get an error message

Re: [R] Re : AUC under spline curve

2006-04-10 Thread Simon Wood
## trapezoidal weights sum(w*f) ## integral ## ... same again with standard error... Xf - predict.gam(m,pd,type=lpmatrix) t(w)%*%Xf%*%coef(m) ## integral sqrt(t(w)%*%Xf%*%m$Vp%*%t(Xf)%*%w) ## its standard error best, Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY

Re: [R] R crashes during 'eigen'

2006-03-30 Thread Simon Wood
robust' is not roust enough in this case :-)] Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] R crashes during 'eigen'

2006-03-29 Thread Simon Wood
isn't it? All the non-zero eigenvalues are the same for this matrix, so the eigenvectors can't be uniquely defined, can they? best, Simon - Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/ Andy PS. My

Re: [R] gam y-axis interpretation

2006-03-28 Thread Simon Wood
- Simon Wood, Mathematical Sciences, University of Bath, Bath BA2 7AY - +44 (0)1225 386603 www.maths.bath.ac.uk/~sw283/ On Thu, 23 Mar 2006, Bliese, Paul D LTC USAMH wrote: Sorry if this is an obvious question... I'm estimating a simple binomial generalized additive

Re: [R] Constrained linear least squares

2006-03-14 Thread Simon Wood
mgcv::pcls will do this, but there are other packages for quadratic programming as well. Simon On Tue, 7 Mar 2006, Domenico Vistocco wrote: Is there a function in R for constrained linear least squares? I used the matlab function LSQLIN: my aim is to obtain non-negative regression

Re: [R] predicted values in mgcv gam

2006-03-08 Thread Simon Wood
Hi Denis, Your first plot is of f(x) against x where \sum_i f(x_i) = 0 (x_i are observed x's). Your second plot is of \exp(\alpha + f(x)) against x where \sum_i f(x_i)=0, and \alpha is an intercept parameter. So the zero line on the first plot, corresponds to the \exp(\alpha) line on the second

Re: [R] Periodic B-spline surface

2006-02-14 Thread Simon Wood
There's a periodic cubic spline smoother built into package mgcv's gam function (although it happens not to use a B-spline basis). This can be used in tensor product smooth surfaces. e.g. gam(y~te(x,z,bs=c(cc,cc))) best, Simon Hi.., is there any funcrion in R to fit a periodic B-spline

Re: [R] gam

2006-01-26 Thread Simon Wood
I'm new to both R and to this list and would like to get advice on how to build generalized additive models in R. Based on the description of gam, which I found on the R website, I specified the following model: model1-gam(ST~s(MOWST1),family=binomial,data=strikes.S), in which ST is my

Re: [R] GAM and AIC: How can I do??? please

2005-10-25 Thread Simon Wood
Please send R and mgcv version numbers, as I can't replicate this problem. best, Simon Hello, I'm a Korean researcher who have been started to learn the R package. I want to make gam model and AIC value of the model to compare several models. I did the GAM model, but

Re: [R] testing non-linear component in mgcv:gam

2005-10-24 Thread Simon Wood
In this case the models being compared are really identical, and the P-value is meaningless numerical noise. If your main focus is hypothesis testing and you really need near exact p-values, then do this sort of testing using unpenalized models. i.e. don't have mgcv::gam estimate the EDF of the

Re: [R] testing non-linear component in mgcv:gam

2005-10-24 Thread Simon Wood
Looks like a bug in mgcv::summary.gam when the model is strictly parametric... I'll take a look and fix it. thanks, Simon In my original message I mentioned a gam fit that turns out to be a linear fit. By curiosity I analysed it with a linear predictor only with mgcv package, and then as a

Re: [R] Estimate predictor contribution in GAM models

2005-09-30 Thread Simon Wood
On Tue, 20 Sep 2005, Yves Magliulo wrote: hi, i'm using gam() function from package mgcv. if G is my gam object, then SG=summary(G) Formula: y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3) Parametric coefficients: Estimate std. err.t ratioPr(|t|) (Intercept) 3.462e+07

Re: [R] Smooth terms significance in GAM models

2005-09-30 Thread Simon Wood
i'm using gam() function from package mgcv with default option (edf estimated by GCV). G=gam(y ~ s(x0, k = 5) + s(x1) + s(x2, k = 3)) SG=summary(G) Formula: y ~ +s(x0, k = 5) + s(x1) + s(x2, k = 3) Parametric coefficients: Estimate std. err.t ratioPr(|t|)

[R] [R-pkgs] mgcv 1.2-0

2005-03-11 Thread Simon Wood
estimates etc. efficiently, for any quantities derived from a fitted gam model are provided in ?predict.gam. _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow

Re: [R] constraining initial slope in smoother.spline

2005-03-02 Thread Simon Wood
Hello. I want to fit a smoother spline (or an equivalent local regression method) to a series of data in which the initial value of the 1st derivative (slope) is constrained to a specific value. Is it possible to do this? If so, how? - you should be able to modify the example in the help

Re: [R] prediction, gam, mgcv

2005-02-28 Thread Simon Wood
])-exp(pred[2]) _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [R] gam(mgcv) starting values

2005-02-14 Thread Simon Wood
starting values is likely to help here (the starting values won't make any E(y)=0, after all). best, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow

Re: [R] embedding fonts in eps files

2005-01-18 Thread Simon Wood
Do you ultimately need the eps files themselves with embedded fonts, or is that you need to include them in a document that that has all fonts embedded? If it's the latter then you may find: http://mpa.itc.it/markus/highres_pdf.html useful. The trick seems to be to substitute the standard

Re: [R] find source code

2005-01-17 Thread Simon Wood
stats:::kruskal.test.default On Mon, 17 Jan 2005 [EMAIL PROTECTED] wrote: I am using R 2.0.2 on a WinXP I am trying to get the code of the Kruskal-Wallis test but kruskal.test function (x, ...) UseMethod(kruskal.test) environment: namespace:stats ls(3) [1] acf

Re: [R] GAM: Remedial measures

2005-01-14 Thread Simon Wood
the MASS library, and a third is to use the quasi family. Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141

Re: [R] GAM: Getting standard errors from the parametric terms in a GAM model

2004-12-22 Thread Simon Wood
summary.gam and anova.gam in package mgcv will report standard errors and p-values for parametric terms, as well as smooth terms, for a gam fitted by function gam from package mgcv. Simon I am new to R. I'm using the function GAM and wanted to get standard errors and p-values for the

Re: [R] GAM: Overfitting

2004-12-22 Thread Simon Wood
I am analyzing particulate matter data (PM10) on a small data set (147 observations). I fitted a semi-parametric model and am worried about overfitting. How can one check for model fit in GAM? - Keeping a random subset of the data as a validation set, fitting to the remaining data and then

Re: [R] Gam() function in R

2004-12-06 Thread Simon Wood
limit on the range of degrees of freedom considered). Package gss also has routines for fitting GAMs where the choise of df is fully automatic. best, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon

Re: [R] Gam() function in R

2004-12-06 Thread Simon Wood
in your models then mgcv is probably worth a try (but I would say that). If you want to use local regression smoothers and/or prefer the stepwise selection approach then package gam is for you. Simon _ Simon Wood [EMAIL PROTECTED

Re: [R] step.gam

2004-12-01 Thread Simon Wood
_ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [R] Matrix decomposition: orthogonal complement

2004-11-02 Thread Simon Wood
How I can compute in R the orthogonal complement of one matrix? use the qr decomposition. For example: A-matrix(rnorm(40),10,4) B - t(qr.Q(qr(A),complete=TRUE)[,5:10]) B%*%A best, Simon If A (n x m ) matrix of full column rank (nm), its orthogonal complement is denoted by A_ . A_

Re: [R] Compilation error on mgcv_1.1-7 on OS X (10.3)

2004-11-01 Thread Simon Wood
ld: warning -L: directory name (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2) does not exist ld: warning -L: directory name (/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2/../../..) does not exist ld: can't locate file for: -lfrtbegin make: *** [mgcv.so] Error 1 ERROR:

Re: [R] GLM model vs. GAM model

2004-10-28 Thread Simon Wood
, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [R] AIC in GAM model

2004-10-19 Thread Simon Wood
How can I obtain AIC index when my model is a GAM? Thanks um - gam(y~s(x)) AIC(um) - I think this works for packages mgcv (1.1) and gam. best, Simon __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] need help on GAM

2004-10-12 Thread Simon Wood
of the basis functions of the smooths. best, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530

Re: [R] geographically weighted glm

2004-09-24 Thread Simon Wood
. Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [R] gam

2004-06-16 Thread Simon Wood
. the purpose is to access to equation of smooths terms in order to have the equation of my additive model. best, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University

Re: [R] GAM question

2004-06-04 Thread Simon Wood
Warning in eval(expr, envir, enclos) : non-integer #successes in a binomial glm! - one way of specifying a logistic regression model is to supply the observed proportion of sucesses as the response variable (e.g. y) and the binomial n as the weights. The warning is complaining that y/n is

Re: [R] GLMMs LMEs: dispersion parameters, fixed variances, design matrices

2004-05-13 Thread Simon Wood
Hi Mark, (2) Is there a way to tell lme (either in nlme or lme4) to just use a specified design matrix Z for the random effects, rather than constructing one itself from factors? Sometimes I would really like to use my own funny-looking Z matrix (e.g. with non-integer coefficients), and even

Re: [R] line transect method

2004-04-29 Thread Simon Wood
It might be worth looking at: http://www.ruwpa.st-and.ac.uk/estimating.abundance/ best, Simon On Thu, 29 Apr 2004, Villirillo wrote: Hello, I'm a final-year student in statistics and I deal with as subject of thesis rare and elusive populations. I want make a simulation, in which I want

Re: [R] eigenvalues for a sparse matrix

2004-04-07 Thread Simon Wood
Golub and van Loan (1996) will probably tell you what to do. Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141

RE: [R] GAM with Locfit components

2004-04-06 Thread Simon Wood
From mgcv 1.0 you can add your own smoothers for use with gam, but only if they can be represented using basis functions and a quadratic penalty: so P-splines are OK, but loess is not, for example. Simon Loader's book is referring to the gam() function in S-plus (or S from Bell Labs), not the

[R] [R-pkgs] mgcv 1.0

2004-03-17 Thread Simon Wood
of mgcv. 2. There's likely to be the odd teething problem - please let me know about them so they can get fixed. _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow

Re: [R] help

2004-03-15 Thread Simon Wood
I want to extract the first non-zero digit of any vector, as for example from a-runif(100,0,1). a[min((1:length(a))[a!=0])] _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics

Re: [R] non-negative least-squares

2004-03-02 Thread Simon Wood
I think pcls will do what you want. You'll need to explicitly set up the constraint matrix, since pcls is designed to deal with general linear inequality constraints (i.e. it will do more than just non-negativity). Also the penalty matrix/matrices for pcls would be t(L)%*%L, I think. btw, there's

Re: [R] Debugging R Code

2004-02-12 Thread Simon Wood
Maybe try Mark Bravingtons's debug package? (see article in last R news) is there a more convenient way to debug R code than the built in debug() function? (so that one can set breakpoints, step in and out of function calls,...). I read the section on debugging compiled code in the manual

Re: [R] Packages debug and mvbutils

2004-01-22 Thread Simon Wood
. _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 __ [EMAIL

Re: [R] Y axis scale in plot.gam

2003-11-25 Thread Simon Wood
. _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 __ [EMAIL PROTECTED] mailing

Re: [R] constrained nonlinear optimisation in R?

2003-10-31 Thread Simon Wood
of Newton's method)? There's an R library for quadratic programming Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0

Re: [R]gam and concurvity

2003-09-17 Thread Simon Wood
wait to see what the referees say though!) Simon ps. mgcv 0.9 out now! (changes list linked to my www page) _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow

[R] Re: mgcv 0.9 install

2003-09-17 Thread Simon Wood
/usr/bin/ld: cannot find -lf77blas - this is the problem, the linker can't find the basic linear algebra system library on your machine (I'm surprised R can be built without this). I think you may need to install the atlas package, but am not sure: hopefully someone else will know... Simon

Re: [R] missing values and gam (was: how to handle missing values)

2003-07-17 Thread Simon Wood
mgcv 0.9 will handle missing values properly (provided you are happy that dropping them is 'proper'). There is a pre-release version at: www.stats.gla.ac.uk/~simon/simon/mgcv.html (it is a pre-release version, so there will be bugs, reports of which gratefully received!) simon Thank you for

Re: [R] More questions about gam and plot

2003-07-15 Thread Simon Wood
? - By default, persp picks up the first two covariates in your model. If you want to plot against other variables you need to tell persp this... see ?persp.gam. best, Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk

Re: [R] gam and step

2003-07-14 Thread Simon Wood
] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330

Re: [R] GLS in R

2003-07-10 Thread Simon Wood
^{-T}X using solve() (assuming model is y=Xb+e). Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530

Re: [R] lm diagnostics and qr (fwd)

2003-06-26 Thread Simon Wood
and Van Loan, Matrix Computations (1983, section 6.4. p162 - I don't have newer editions to hand). Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow

Re: [R] partial residuals in plot.gam()

2003-06-06 Thread Simon Wood
_ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 __ [EMAIL PROTECTED] mailing

Re: [R] S+ style implementation of GAM for R?

2003-06-04 Thread Simon Wood
I've got the R library mgcv for GAM written by Simon Wood which works well in many instances. However, over the years I got attached to the S+ implementation of GAM which allows loess smoothing in more than 1 dimension as well as spline smoothing. Has anyone ported the S+ GAM library to R

Re: [R] gam questions

2003-06-03 Thread Simon Wood
). Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [R] gam questions

2003-06-03 Thread Simon Wood
It's the gam.predict example. Instead of pred-predict.gam(b,newd) I tried pred-predict.gam(b). - Ok, thanks - this is a bug I missed, I'll fix it. The results should be unaffected, though. Simon __ [EMAIL PROTECTED] mailing list

Re: [R] How to estimate or approximate a 3-D surface

2003-03-04 Thread Simon Wood
? Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814

Re: [despammed] RE: [R] multidimensional function fitting

2003-03-03 Thread Simon Wood
8-) 2) It is very memory hungry, esp. when using the s() function: I have 8-) 192Mb with 256Mb swap (not a lot, but reasonable I'd say), and I've 8-) never had to kill R as often as when trying gam()... 8-) 8-) - do you have a very large number of data? The way mgcv works it first

Re: [R] floating point question

2003-02-01 Thread Simon Wood
Incidentally, this may well be a reason for the irritating habit of DLLs in setting the floating point precision to 53 bits (well, the irritating bit is not changing it back). This makes the results of computations more nearly independent of where the numbers end up being stored. - I suspect

Re: [R] something wrong when using pspline in clogit?

2003-01-22 Thread Simon Wood
. Simon _ Simon Wood [EMAIL PROTECTED] www.ruwpa.st-and.ac.uk/simon.html Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 On Wed, 22 Jan 2003

Re: [R] GAM with Thin plate splines

2003-01-09 Thread Simon Wood
My goal is to find a model (GAM with thin plate splines) in R. I found the function gam in the R-library mgcv, but it just fits one-dimensial splines. - Unless you have an exceedingly ancient version of mgcv (0.6), it *does* allow spline smooths of more than one variable. ?gam contains a

Re: [R] GAM with Thin plate splines

2003-01-09 Thread Simon Wood
The default basis for smooth terms in mgcv is a truncated thin plate spline basis, and has been since the later part of 2001. Including terms like `s(x,z)', `s(x0,x1,x2)' in the model formula is the way to include such terms (see help files, and examples therin). best, Simon Last time I worked

  1   2   >