Best Wishes,
spencer gravesSimon Fear wrote:
One could also fit
fit <- lm(y~A*B - 1, data.frame(y=..., A=..., B=..,)
which will give a direct a:b term (as the negative of the intercept in Spenser's formulation). Arguably this is more natural in a setting where there is no placebo so that an intercept term has a less obvious interpretation.
http://www.R-project.org/posting-guide.html-----Original Message----- From: Spencer Graves [mailto:[EMAIL PROTECTED] Sent: 06 February 2004 14:39 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [R] Incomplete Factorial design
Security Warning: If you are not sure an attachment is safe to open please contact Andy on x234. There are 0 attachments with this message. ________________________________________________________________
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
[EMAIL PROTECTED] wrote:
Hello,interaction of two treatments,
I am planning a study with the main point to evaluate the
but for ethical reasons one cell is empty, that withpatients receaving no treatment at all
Treatment Band/or to conduct the
+
-
Treatment A + a b
-
c
-------
I am looking for functions in R to estimate the sample size
analysis. I have just found an article from Byar inStatistics in Medicine for a 2^3
incomplete factorial design, but I would like not todiscover 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]]
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
______________________________________________
[EMAIL PROTECTED] 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
Simon Fear Senior Statistician Syne qua non Ltd Tel: +44 (0) 1379 644449 Fax: +44 (0) 1379 644445 email: [EMAIL PROTECTED] web: http://www.synequanon.com Number of attachments included with this message: 0 This message (and any associated files) is confidential and\...{{dropped}}
______________________________________________
[EMAIL PROTECTED] 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
______________________________________________ [EMAIL PROTECTED] 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
