[R] simple question beginner

2009-03-10 Thread Λεωνίδας Μπαντής
 
Hi there,
 
I am beginner in R and I have some basic question. Suppose I run a common 
procedure such as a t test or cox model like below:
 
out-coxph( Surv(tstart,tstop, death1) ~ x1+x1:log(tstop+1) , 
test1,method=c(breslow)) 
 
Which yields the following result:
 
Call:
coxph(formula = Surv(tstart, tstop, death1) ~ x1 + x1:log(tstop + 
    1), data = test1, method = c(breslow))

   coef exp(coef) se(coef) z    p
x1    -9.58  6.89e-05 6.83 -1.40 0.16
x1:log(tstop + 1)  6.90  9.93e+02 5.63  1.23 0.22
Likelihood ratio test=2.97  on 2 df, p=0.226  n= 120 
 
 
Now I simply want to create an array (let a) with the coefficients. I.e. I 
want
 
a-c(-9.58, 6.90)
 
Generally how can take the elements I want from the output matrix above for 
further manipulation?
 
Thanks in advance for any answer!!
 
 


  
___ 
×ñçóéìïðïéåßôå Yahoo!; 
ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíýìáôá (spam); Ôï Yahoo! Mail 
äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí 
ìçíõìÜôùí http://login.yahoo.com/config/mail?.intl=gr

[[alternative HTML version deleted]]

__
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.


Re: [R] simple question beginner

2009-03-10 Thread Mike Lawrence
names() is a great function for finding out how to get info from
objects of unknown structure, so try:
names(out)



2009/3/10 Λεωνίδας Μπαντής bleonida...@yahoo.gr:

 Hi there,

 I am beginner in R and I have some basic question. Suppose I run a common 
 procedure such as a t test or cox model like below:

 out-coxph( Surv(tstart,tstop, death1) ~ x1+x1:log(tstop+1) , 
 test1,method=c(breslow))

 Which yields the following result:

 Call:
 coxph(formula = Surv(tstart, tstop, death1) ~ x1 + x1:log(tstop +
     1), data = test1, method = c(breslow))

    coef exp(coef) se(coef) z    p
 x1    -9.58  6.89e-05 6.83 -1.40 0.16
 x1:log(tstop + 1)  6.90  9.93e+02 5.63  1.23 0.22
 Likelihood ratio test=2.97  on 2 df, p=0.226  n= 120


 Now I simply want to create an array (let a) with the coefficients. I.e. I 
 want

 a-c(-9.58, 6.90)

 Generally how can take the elements I want from the output matrix above for 
 further manipulation?

 Thanks in advance for any answer!!





 ___
 ×ñçóéìïðïéåßôå Yahoo!;
 ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíýìáôá (spam); Ôï Yahoo! Mail
 äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí
 ìçíõìÜôùí http://login.yahoo.com/config/mail?.intl=gr

        [[alternative HTML version deleted]]


 __
 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.





-- 
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

Looking to arrange a meeting? Check my public calendar:
http://tinyurl.com/mikes-public-calendar

~ Certainty is folly... I think. ~

__
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.