Hello We would like to perform a logistic regression analysis weighting the independent variable in a temporal fashion, i.e. events occuring most recent get highest weight. Does anyone know how to do this in R?? Regards S. Merser and S. Lophaven
Hello, You can either use nls and add weights see ?nls. Or use a generalized linear model and also change the weights. se ?glm Regards Wayne -----Original Message----- From: merser@tiscali.dk [mailto:merser@tiscali.dk] Sent: 18 March 2004 08:37 To: r-help@stat.math.ethz.ch Subject: [R] logistic regression with temporal correlation Hello We would like to perform a logistic regression analysis weighting the independent variable in a temporal fashion, i.e. events occuring most recent get highest weight. Does anyone know how to do this in R?? Regards S. Merser and S. Lophaven ______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:kssg@kssg.com http://www.kssg.com The information in this Internet email is confidential and m...{{dropped}}
This is not `temporal correlation'. You can supply a weights argument to glm and so downweight older observations. Since the theory is no longer exactly apposite, treat the standard errors etc with some caution. On Thu, 18 Mar 2004 merser at tiscali.dk wrote:> We would like to perform a logistic regression analysis weighting the > independent variable in a temporal fashion, i.e. events occuring most > recent get highest weight. Does anyone know how to do this in R?? > > Regards > S. Merser and S. Lophaven-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595