Dear R users, if all my numerical variables in my datasets having the same units, may I leave them unnormalized, just do cv.glmnet directly(cv.glmnet(data,standardize=FALSE))? i know normally if there is a mixture of numerical and categorical , one has to standardize the numerical part before applying cv.glmnet with standardize=fase, but that's due to the different units in the numerical part, right? so if all the units are the same, could I skip the pre standardize part? I tried both ways(standardize the numerical part and not standardize numerical part), the results are very similar, what I don't understand is for the coefficients of categorical variables, why they are so different in two cases? Many thanks Yan -- View this message in context: http://r.789695.n4.nabble.com/using-glmnet-for-the-dataset-with-numerical-and-categorical-tp4636279.html Sent from the R help mailing list archive at Nabble.com.
Bert Gunter
2012-Jul-12 13:34 UTC
[R] using glmnet for the dataset with numerical and categorical
... and you are unlikely to get a helpful reply until you follow the posting guide and post code that shows what you did. Unless there's a claiRvoyant package out there somewhere to figure it out. -- Bert On Thu, Jul 12, 2012 at 3:43 AM, yan <y.jiao@ucl.ac.uk> wrote:> Dear R users, > > if all my numerical variables in my datasets having the same units, may I > leave them unnormalized, just do cv.glmnet > directly(cv.glmnet(data,standardize=FALSE))? > i know normally if there is a mixture of numerical and categorical , one > has > to standardize the numerical part before applying cv.glmnet with > standardize=fase, but that's due to the different units in the numerical > part, right? so if all the units are the same, could I skip the pre > standardize part? > > I tried both ways(standardize the numerical part and not standardize > numerical part), the results are very similar, what I don't understand is > for the coefficients of categorical variables, why they are so different in > two cases? > > Many thanks > > Yan > > -- > View this message in context: > http://r.789695.n4.nabble.com/using-glmnet-for-the-dataset-with-numerical-and-categorical-tp4636279.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. >-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm [[alternative HTML version deleted]]