[R] Incomplete Factorial design

Spencer Graves spencer.graves at pdf.com
Fri Feb 6 15:38:34 CET 2004


      I assume that means you have two treatments, say A and B, can be 
either absent or present.  The standard analysis codes them as -1 or +1 
for absent or present, respectively.  If you have observations in all 4 
cells, you can write the following equation: 

      y(A,B) = b0 + b1*A + b2*B + b12*A*B + error. 

      This equation has 4 unknowns, b1, b1, b2 and b12.  If you have all 
4 cells in the 2x2 table, then you can estimate all 4 unknowns.  If you 
have data for only 3 cells, the standard analysis pretends that b12 = 0 
and estimates the other three.  If you have only 2 cells, say (both 
absent) and (both present), the standard analysis can estimate b0 plus 
either of b1 or b2.  However, in fact, these really estimate (b0+b12) 
and (b1+b2).  To understand this, consult any good book that discusses 
confounding with 2-level fractional factorial designs. 

      To do this in R, use "lm", as

      fit <- lm(y~A+B, data.frame(y=..., A=..., B=..,)

      hope this helps. 
      spencer graves

parrinel at med.unibs.it wrote:

>Hello,
>I am planning a study with the main point to evaluate the interaction of two treatments, 
>but for ethical reasons one cell is empty, that with patients receaving no treatment at all
>
>                                                                    
>                                                                    
>                            Treatment B
>                                  
>                                                                    
>                                                                    
>+
>-
>
>Treatment A
>+
>a
>b
>
>                                                                    
>-
>c
>-------
>
>
>I am looking for functions in R to estimate the sample size and/or to conduct the 
>analysis. I have just found an article from Byar in Statistics in Medicine for a 2^3 
>incomplete factorial design, but I would like not to discover again the wheel..
>TIA
>dr. Giovanni Parrinello
>Section of Medical Statistics
>Department of Biosciences
>University of Brescia
>25127 Viale Europa, 11
>Brescia Italy
>Tel: +390303717528
>Fax: +390303701157
>
>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>  
>




More information about the R-help mailing list