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

From: Pang Du <pangdu_at_vt.edu>
Date: Thu, 05 May 2011 09:37:15 -0400

Oops, I hope not too. Don't know why I had the brackets around B+C. My model is actually A*B+C. And I'm not sure how to obtain the two-way prediction of AB with C marginalized. Thanks.

Pang

-----Original Message-----
From: Andrew Robinson [mailto:A.Robinson_at_ms.unimelb.edu.au] Sent: Wednesday, May 04, 2011 10:13 PM
To: Pang Du

Cc: r-help_at_r-project.org
Subject: Re: [R] two-way group mean prediction in survreg with three factors

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/

______________________________________________
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.
Received on Thu 05 May 2011 - 14:56:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 May 2011 - 01:50:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive