Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-06 Thread zhu yao
Thanks Michael. I have read the original article and I guess whether the following formula could resolve my question? *for adjusted HR of each BMI category,* fit-coxph(Surv~factor(BMI-category)+..+covariates) *for trend, * fit-coxph(Surv~as.numeric(BMI-category)+..+covariates) *# p trend may be

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-05 Thread zhu yao
Thanks peter. *Yao Zhu* *Department of UrologyFudan University Shanghai Cancer CenterShanghai, China* 2014/1/5 peter dalgaard pda...@gmail.com On 04 Jan 2014, at 13:56 , zhu yao mailzhu...@gmail.com wrote: Thanks for the suggestion. The results is presented in following table. The

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-05 Thread Michael Friendly
On 1/4/2014 12:39 AM, zhu yao wrote: Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R? Thanks *Yao Zhu* If what you are looking at is a 2 x 2 x k table, where you want the odds

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread Uwe Ligges
On 04.01.2014 06:39, zhu yao wrote: Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R? Depends on the method you want to use ... and most ladies and gents on this list won't

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread peter dalgaard
On 04 Jan 2014, at 12:53 , Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 04.01.2014 06:39, zhu yao wrote: Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R?

Re: [R] p value of trends for odds ratios (or hazard ratios)

2014-01-04 Thread peter dalgaard
On 04 Jan 2014, at 13:56 , zhu yao mailzhu...@gmail.com wrote: Thanks for the suggestion. The results is presented in following table. The authors calculated p value for linearity and trend and they stated in the methods: Linear and nonlinear trends of BMI associated with each mortality

[R] p value of trends for odds ratios (or hazard ratios)

2014-01-03 Thread zhu yao
Dear Sir Many papers calculated the p value of trends for odds ratios of ordered category variables. I have found the tabodds command in Stata. But how to do it in R? Thanks *Yao Zhu* *Department of UrologyFudan University Shanghai Cancer CenterShanghai, China* [[alternative HTML