R version: 2.10.0
platform: i486-pc-linux-gnu
I'm trying to perform model selection from a data.frame object (creatively
named "data") using the leaps function, and I run across the following
error:
> leaps(data[,3:7], data[,1], nbest = 10)
Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, :
character variables must be duplicated in .C/.Fortran
Here is a sample of what 'data' looks like:
ethanol flask batch delabso delgluc delglyc ph
1 0.00 1 0 1.41 0.0 0.7 1
2 0.00 2 0 1.33 0.0 0.6 9
3 0.00 2 0 1.18 0.0 1.1 1
4 0.00 3 1 1.58 0.0 3.5 1
5 0.00 4 0 1.25 0.0 5.0 1
6 0.00 4 0 -0.01 0.0 5.0 1
7 0.32 5 0 -0.08 0.0 1.5 1
8 0.00 6 1 1.22 0.1 3.0 1
9 0.00 6 1 1.30 0.3 0.4 1
10 0.13 7 0 1.48 0.3 1.4 1
where flask, batch, and ph are factors and the rest of the variables are of
class numeric. There are NAs in this data set. Does anyone understand this?
Thanks
Matt Scholz
PhD Candidate
Department of Ag. and Biosystems Engineering
University of Arizona
(520)6266947
[[alternative HTML version deleted]]