| To: | ecm@casbah.acns.nwu.edu, mdradmac@helix.nih.gov, s-news@wubios.wustl.edu |
|---|---|
| Subject: | [S] How do you create a formula for a model with a large number of variables? |
| From: | Adrian Baddeley <adrian@maths.uwa.edu.au> |
| Date: | Mon, 28 Jun 1999 10:38:37 +0800 |
| Sender: | owner-s-news@wubios.wustl.edu |
> How do you create a formula for a model
> with a large number of variables?
names <- paste("x", 1:25, sep="")
rhs <- paste(names, collapse=" + ")
fmla <- as.formula(paste("y ~ ", rhs))
fmla
y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 + x14 +
x15 + x16 + x17 + x18 + x19 + x20 + x21 + x22 + x23 + x24 + x25
----
Prof Adrian Baddeley, Mathematics & Statistics, University of Western Australia
<http://maths.uwa.edu.au/~adrian/>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [S] Generalized additive models for matched case-control data?, Peter Cummings |
|---|---|
| Next by Date: | [S] spin on Solaris-Xceed-NT, Christian Hoffmann |
| Previous by Thread: | Re: [S] How do you create a formula for a model with a large number of variables?, Edward Malthouse |
| Next by Thread: | [S] Remove column(s) from data frame?, David Parkhurst |
| Indexes: | [Date] [Thread] [Top] [All Lists] |