[R] differences between survival models between STATA and R

2012-07-06 Thread JPF
Dear Community, I have been using two types of survival programs to analyse a data set. The first one is an R function called aftreg. The second one an STATA function called streg. Both of them include the same analyisis with a weibull distribution. Yet, results are very different. Shouldn't

Re: [R] pooled hazard model with aftreg and time-dependent variables

2011-08-24 Thread JPF
This is for coxph: The cluster term is used to compute a robust variance for the model. The term + cluster(id) where each value of id is unique is equivalent to specifying the robust=T argument, and produces an approximate jackknife estimate of the variance. If the id variable were not unique,

Re: [R] pooled hazard model with aftreg and time-dependent variables

2011-08-22 Thread JPF
In STATA, multiple observations correspond to the same individual, the cluster( ) option can be employed to request that the analysis be clustered by individual. Any suggestion with aftreg? Thanks, J -- View this message in context:

Re: [R] AFT model time-dependent with weibull distribution

2011-08-21 Thread JPF
thanks! -- View this message in context: http://r.789695.n4.nabble.com/AFT-model-time-dependent-with-weibull-distribution-tp3755079p3758267.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] pooled hazard model with aftreg and time-dependent variables

2011-08-21 Thread JPF
Dear R-users, I have two samples with individuals that are in more than one of the samples and individuals that are only in one sample. I have been trying to do a pooled hazard model, stacking one sample below the other, with aftreg and time-dependent covariates. The idea behind is to see

Re: [R] AFT model time-dependent with weibull distribution

2011-08-20 Thread JPF
Göran Broström wrote: Good. Do you still need answers to your other questions? Yes. Could answer the following two questions: 1- Can I use phreg function to estimate a model with time-dependent covariates? In case of a positive answer, how? 2- I could not find any example that

Re: [R] AFT model time-dependent with weibull distribution

2011-08-20 Thread JPF
question 2 *aftreg vs. survreg* for aftreg = S0 *{t/exp(b-BXi)]^a} a= shape and b= log(scale) for survreg and stata S0 *{t*exp(intercept+BXi)]^1/p} p=shape /intercept, log(scale) and estimates are equivalent with reversed sign./ *PH and AFT* /phreg.Bhat= aftreg.Bhat * shape /

Re: [R] AFT model time-dependent with weibull distribution

2011-08-19 Thread JPF
Dear Prof. Broström, I have searched in the reference manual inside the package eha, updated recently. I did not find any description on how to enter id in the aftreg function except the description of the argument. Can you refer to a specific part of the manual? Do you mean another

Re: [R] AFT model time-dependent with weibull distribution

2011-08-19 Thread JPF
JPF wrote: weibullaft-aftreg(Surv(sta,time,S) ~ TDC1 + TIC1, dist=weibull, data.frame=Data) ## aftreg gives an error when I add an ID argument... That should be used for controlling for time-varying variables. Error in aftreg.fit(X, Y, dist, strats, offset, init, shape, id