[R] two-way group mean prediction in survreg with three factors

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Thu May 5 04:12:49 CEST 2011


I hope not!

Facetiousness aside, the model that you have fit contains C, and,
indeed, an interaction between A and C.  So, the effect of A upon the
response variable depends on the level of C.  The summary you want
must marginalize C somehow, probably by a weighted or unweighted
average across its levels.  What does that summary really mean?  Can
you meaningfully average across the levels of a predictor that is
included in the model as a main and an interaction term?

Best wishes

Andrew

On Wed, May 04, 2011 at 12:24:50PM -0400, Pang Du wrote:
> I'm fitting a regression model for censored data with three categorical
> predictors, say A, B, C.  My final model based on the survreg function is 
> 
> Surv(..) ~ A*(B+C).
> 
> I know the three-way group mean estimates can be computed using the predict
> function. But is there any way to obtain two-way group mean estimates, say
> estimated group mean for (A1, B1)-group?  The sample group means don't
> incorporate censoring and thus may not be appropriate here.
> 
>  
> 
> Pang Du
> 
> Virginia Tech
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.

-- 
Andrew Robinson  
Program Manager, ACERA 
Department of Mathematics and Statistics            Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia               (prefer email)
http://www.ms.unimelb.edu.au/~andrewpr              Fax: +61-3-8344-4599
http://www.acera.unimelb.edu.au/

Forest Analytics with R (Springer, 2011) 
http://www.ms.unimelb.edu.au/FAwR/
Introduction to Scientific Programming and Simulation using R (CRC, 2009): 
http://www.ms.unimelb.edu.au/spuRs/



More information about the R-help mailing list