Robert Nee
2011-Aug-25 05:53 UTC
[R] Error message related to 'weights for observations' argument in glmpath
Hello- I am new to R and am trying to use glmpath for LASSO logistic regression. My data set contains 40 observations and a mix of dichotomous, categorical, and continuous potential predictor variables. I am having a problem with the 'weight = rep(1, n)' argument that relates to an optional vector of weights for observations. I would like to have the same weight for all 40 observations. However, if I enter 'weight = rep(1, 40)' as part of my code, I get the following error message: "Error in if (length(weight) != n) { : argument is of length zero". I would appreciate any help that people can offer and apologize in advance if I have missed an obvious answer. Kind regards, Bob Robert J. Nee, PhD Candidate Division of Physiotherapy School of Health and Rehabilitation Sciences The University of Queensland St. Lucia, QLD 4072 AUSTRALIA r.nee@uq.edu.au<mailto:r.nee@uq.edu.au> [[alternative HTML version deleted]]