Hi, and thanks for your help in order to do collinearity analysis I downloaded the perturb package. I run a lm (regression) and on that the ??calldiag?? commad to get condition numbers but i get the following message: the variable XY with modus ??numeric?? was not found (it does the same with all predictors despite all variables are numeric and exists). Can anyone tell me how can I go arround this problem? Is there another way to have ??condition numbers??? What about VIF? Please return message to: antoine at ruetter.ch Thanks a lot Antoine
Collineariy Diagnostics
5 messages · Antoine de Bary, Sundar Dorai-Raj, John Fox +2 more
Antoine de Bary wrote:
Hi, and thanks for your help in order to do collinearity analysis I downloaded the perturb package. I run a lm (regression) and on that the ??calldiag?? commad to get condition numbers but i get the following message: the variable XY with modus ??numeric?? was not found (it does the same with all predictors despite all variables are numeric and exists). Can anyone tell me how can I go arround this problem? Is there another way to have ??condition numbers??? What about VIF? Please return message to: antoine at ruetter.ch
I cannot comment on the "perturb" package. However for condition numbers see ?kappa.lm, and for variance inflation factors see ?vif. The latter is in the Design package. set.seed(1) x1 <- rnorm(100) x2 <- x1 + 0.1 * rnorm(100) y <- rnorm(100) f <- lm(y ~ x1 + x2) vif(f) kappa(f) HTH, --sundar
Dear Sundar and Antoine, In addition, the vif function in the car package will calculate generalized variance inflation factors. Regards, John -------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox --------------------------------
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Sundar Dorai-Raj Sent: Tuesday, September 13, 2005 5:16 AM To: Antoine de Bary Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Collineariy Diagnostics Antoine de Bary wrote:
Hi, and thanks for your help in order to do collinearity analysis I downloaded the
perturb package.
I run a lm (regression) and on that the ??calldiag?? commad to get condition numbers but i get the following message: the variable XY with modus ??numeric?? was not found (it does the same with all predictors despite all variables are numeric and exists). Can anyone tell me how can I go arround this problem? Is
there another
way to have ??condition numbers??? What about VIF? Please return message to: antoine at ruetter.ch
I cannot comment on the "perturb" package. However for condition numbers see ?kappa.lm, and for variance inflation factors see ?vif. The latter is in the Design package. set.seed(1) x1 <- rnorm(100) x2 <- x1 + 0.1 * rnorm(100) y <- rnorm(100) f <- lm(y ~ x1 + x2) vif(f) kappa(f) HTH, --sundar
______________________________________________ R-help at 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
1 day later
Hi, I am using nls() with the form: nls(~my.fcn(...)) because I have to iteratively compute the expected y values. The function my.fcn() returns y.obs-y.pred However, I want to fix some of the parameters in my.fcn at various values and compute the parameter estimates. In Splus there is such a thing as a parameterized dataframe. I don't think this exists in R so does anyone know how to set one or more of the parameters as constants in the model? Thank you. Jeff Breiwick
5 days later
I have passed the identities and values of fixed parameters via the "..." arguments in optim; I don't know about nls. Then internal to the function that optim is to minimize, I combine the "x" argument with the fixed parameters to obtain the full set of parameters. I've used that effectively. It's not trivial, but it can be made to work. spencer graves
J.M. Breiwick wrote:
Hi, I am using nls() with the form: nls(~my.fcn(...)) because I have to iteratively compute the expected y values. The function my.fcn() returns y.obs-y.pred However, I want to fix some of the parameters in my.fcn at various values and compute the parameter estimates. In Splus there is such a thing as a parameterized dataframe. I don't think this exists in R so does anyone know how to set one or more of the parameters as constants in the model? Thank you. Jeff Breiwick
______________________________________________ R-help at 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
Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA spencer.graves at pdf.com www.pdf.com <http://www.pdf.com> Tel: 408-938-4420 Fax: 408-280-7915