You could loop through the list using lapply() or the like.  One way would be 
to subset the data and use . Notation which expands to all variables in the 
dataset not used elsewhere in the model (ie not the outcomes).  

Cheers,

Josh

On Mar 1, 2012, at 14:29, sajjad R <[email protected]> wrote:

> 
> Dear All,
> 
> I hope to run some simple survival analysis using the cox-proportional hazard 
> models in R, my command will look like below:
> 
> cox <- summary( coxph( Surv( mortality , TIME ) ~ Independent variables ) )
> 
> My query is about specifying a range of independnt variables in R,
> such that each independent variable is included as the main defining variable 
> independently of other variables in the variable list. 
> I have around 10,000 independent variables or groups by which I hope to study 
> differences in mortality rates over a period of time. 
> All the 10,000 variables have one thing in common, i.e. their names start 
> with the same alphabets rs followed by unique 6-8 digit numbers.
> 
> Regards,
> 
> Sajjad
>                         
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] 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.

______________________________________________
[email protected] 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