From: lara harrup (IAH-P) <lara.harrup_at_bbsrc.ac.uk>

Date: Fri, 22 Feb 2008 11:33:33 +0000

R-help_at_r-project.org 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. Received on Fri 22 Feb 2008 - 11:37:18 GMT

Date: Fri, 22 Feb 2008 11:33:33 +0000

Hi

I am using ridge regression as a method to over come the
multicollinearity in my dataset and in order to select the lambda (ridge
estimator/regularization parameter) I am generating a ridge trace using
the following commands (using R version 2.6.1):

*>library(MASS)
**>model_0.5km_ridge<- lm.ridge(OUTBREAK ~ .,PREDICTORS_0.5km,lambda =
**>seq(0,1,0.01)) ylim = c(-1.0, 1.0)
**>matplot(model_0.5km_ridge$lambda,t(model_0.5km_ridge$coef),type="l",yli
**>m=ylim,xlab=expression(lambda),ylab=expression(hat(beta)))
*

>abline(h=0,lwd=2)

where PREDICTORS_0.5km is a set of approximately 120 variables split into two groups by a binary dependent variable OUTBREAK which is 1 an outbreak was present at a location and 0 an outbreak was absent at a location, the plot (ridge trace) of the ridge regression model generated using lm.ridge produces a set of curves one per variable in PREDICTORS_0.5km with the coefficients for each variable (y axis) plotted against each value of lambda selected (from zero to one in 0.01 degree increments) (x axis).

As i have a lot of variables what i would like to do is split the plotting of the curves over several subplots (with the same axis) e.g. 20 curves per plot and identify/label selected curves with the variable name, using perhaps something similar to the identify function for scatterplots or locator() function, but i have been at a loss to find how to do this in the literature any help or guidance on how to achieve this would be greatly appreciated.

Regards

Lara Harrup

R-help_at_r-project.org 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. Received on Fri 22 Feb 2008 - 11:37:18 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Fri 22 Feb 2008 - 12:30:16 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*