Hi, 

I'd like to run regsubsets for model selection by exhaustive search. I have
a list with 20 potential explanatory variables, which represent the real and
the imaginary parts of 10 "kinds" of complex numbers:

x <- list(r1=r1, r2=r2, r3=r3, ..., r10=r10, i1=i1, i2=i2, i3=i3, ...,
i10=i10)

Is there an easy way to constrain the model search so that "r"s and "i"s are
treated as pairs that should always appear together in the models? i.e., in
a way where only models like these:

y ~ r1, i1 
y ~ r3, i3, r8, i8
y ~ r1, i1, r4, i4, r5, i5

are considered in the search, and models like the ones below are not:

y ~ r1, i8
y ~ r1, r3
y ~  r9, i5, i7

Sorry if this isn't very clear! 

Thanks
-- 
View this message in context: 
http://r.789695.n4.nabble.com/regsubsets-leaps-tp3318418p3318418.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.

Reply via email to