[R] CROSSOVER TRIALS IN R (Binary Outcomes)

Charles C. Berry cberry at tajo.ucsd.edu
Wed Mar 5 18:31:00 CET 2008


On Wed, 5 Mar 2008, Boikanyo Makubate wrote:

> I will like to analyse a binary cross over design using the random
> effects model. The probability of success is assumed to be logistic.
> Suppose as an example, we have 4 subjects undergoing a crossover design,
> where the outcome is either success or failure. The first two subjects
> receive treatment "A" first followed by treatment "B". The remaining two
> subjects receive treatments in the reverse order. The outcomes for the
> subjects is the sequence "AB" are as follows: (0,1) and (0,0). While the
> outcomes for the subjects in the sequence "BA" are (1,1) and (1,0).
>
> How can i analyse this using R. I have done the problem with PROC
> NLMIXED in SAS, I simply want to compare the results from SAS with those
> from R. Please help. R-Codes will be highly appreciated.


You need to be clear about the statistical model.

In crossover trials, there is usually a subject effect that one conditions 
out of the likelihood (often implicitly).

In this case, clogit() in the survival package would be suitable for such 
an approach. Something like

 	res <- clogit( outcomes ~ rx = strata( subject ) )

However, the example you give is degenerate in the same way that an 
ordinary logistic regression is when the responses are linearly separable 
in the regressor space.

So, a well crafted program will tell you that it cannot find an answer 
(and clogit does this) for your example data.

If you knew all of this and had some other statistical model in mind 
(such as one that models the subject effects rather than conditioning 
on them), you should repost telling us what model you wanted to fit.

HTH,

Chuck

>
> Boikanyo.
>
> ______________________________________________
> 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list