[R] Stepwise regression for multivariate case in R?
f.harrell at vanderbilt.edu
Fri Apr 26 19:16:21 CEST 2013
Since stepwise methods do not work as advertised in the univariate case I'm
wondering why they should work in the multivariate case.
Jonathan Jansson wrote
> Hi! I am trying to make a stepwise regression in the multivariate case,
> using Wilks' Lambda test.
> I've tried this:
>> greedy.wilks(cbind(Y1,Y2) ~ . , data=my.data )
> But it only returns:
> Error in model.frame.default(formula = X[, j] ~ grouping,
> drop.unused.levels = TRUE) :
> variable lengths differ (found for 'grouping')
> What can be wrong here? I have checked and all variables in my.data is of
> the same length.
> [[alternative HTML version deleted]]
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Department of Biostatistics, Vanderbilt University
View this message in context: http://r.789695.n4.nabble.com/Stepwise-regression-for-multivariate-case-in-R-tp4665505p4665526.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help