[R] ANOVA for proportions with large mass on an extreme of [0, 1]

Joaquin Rapela rapela at ucsd.edu
Sat Jun 21 21:41:30 CEST 2014


Bert,

My queries are directly related to R: 

1. Can the R package frm can be used to compare nested models. If so, how.

2. Are there alternative R packages to perform ANOVAs on a dependent variable
that is a proportion with significant mass one one extreme?

Also, my statistical problem is well defined (i.e., perform an ANOVA, ideally
considering repeated measures, on a dependent variable that is a proportion),
there is substantial literature addressing this problem (see some old and
newer articles below), and I am just looking for help on R packages
implementing the functionality described in this literature.

I believe my statistical problem is not complex. After all, ANOVAs are one of
the most common types of statistical analysis, and proportions frequently
appear in statistical problems.  

I just wanted to get some feedback from R users with expertise performing
ANOVAs on proportions. I trust that my statistical problem is not rare, that
several R users have worked on this problem, and that I will get very useful
feedback from them. If I get this feedback, it will show that my question is
no OT. Let's see what happens ...

Cordially, Joaquin

Papke, L. and J.M. Wooldridge (1996), "Econometric methods for fractional
response variables with an application to 401(K) plan participation rates",
Journal of Applied Econometrics, 11(6), 619-32.

Ramalho, E.A., J.J.S. Ramalho and J.M.R. Murteira (2011), "Alternative
estimating and testing empirical strategies for fractional regression
models", Journal of Economic Surveys, 25(1), 19-68.

On Sat, Jun 21, 2014 at 10:27:27AM -0700, Bert Gunter wrote:
> Although your queries certainly intersect R, they are primarily about
> statistical modeling, which is OT for this list. Your issues also
> appear to be complex. I would therefore suggest that you eschew remote
> Internet advice and consult a local statistical expert for help.
> 
> Cheers,
> Bert
> 
> Bert Gunter
> Genentech Nonclinical Biostatistics
> (650) 467-7374
> 
> "Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
> Clifford Stoll
> 
> 
> 
> 
> On Fri, Jun 20, 2014 at 8:54 PM, Joaquin Rapela <rapela at ucsd.edu> wrote:
> >
> > I am trying to perform an ANOVA on a dependent variable that has large mass
> > on the 1 side of the (0, 1] interval. I decided to use Fractional Regression
> > Models, as implemented in the package frm. This package seems well-suited for
> > my problem, but I don't see how to perform model comparisons of nested frm
> > models. Please, see data and code below.
> >
> > I would like to do:
> >
> > anova(model1, model2)
> >
> > There is a function frm.ptest(model1, model2), but does not work with nested
> > models.
> >
> > Are there alternatives to the frm package to perform ANOVAs on proportions
> > (with large mass on an extreme of [0, 1])?
> >
> > Is there a way to model repeated measures (as in package lme4) when the dependent variable is a  proportion?
> >
> > Data and code
> > -------------
> >
> > con <- url("http://sccn.ucsd.edu/~rapela/avshift/anovaDataFrame.RData")
> > myData <- get(load(con))
> > close(con)
> >
> > myData <- myData[!is.na(myData$alternationRate),]
> > y <- myData$alternationRate
> >
> > library(frm)
> >
> > model1 <- frm(y=y, x=model.matrix(~modality*condition+clusterID, data=myData)[, -1], linkfrac="logit", linkbin="logit", type="2P", inflation=1)
> > model2 <- frm(y=y, x=model.matrix(~modality+condition+clusterID, data=myData)[, -1], linkfrac="logit", linkbin="logit", type="2P", inflation=1)
> >
> > # this works
> > frm.ptest(model2, model3)
> >
> > # but this does not
> > # frm.ptest(model1, model2)
> > #
> > # Error in frm.ptest(model1, model2) :
> > # object 2 is nested in object 1 - no need to use the P test
> >
> > Thanks, Joaquin
> >
> > ______________________________________________
> > 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.

-- 
Joaquin Rapela, PhD
Swartz Center for Computational Neuroscience
University of California San Diego
9500 Gilman Drive,
San Diego, CA 92093-0559
tel: (858) 822-7547
fax: (858) 822-7556
http://sccn.ucsd.edu/~rapela
----------------------------------


                                   Tak fyr, and ber it in the derkeste hous
                                   Bitwix this and the Mount of Caucasus,
                                   And lat men shette the dores and go thenne,
                                   Yet wol the fyr as faire lye and brenne,
                                   As twenty thousand men mighte it biholde:
                                   His office naturel ay wol it holde,
                                   Up peril of my lyf, til that it dye.

                                                         Geoffrey Chaucer
                                                         The Canterbury Tales



More information about the R-help mailing list