Hi all,

I have a set of data (attached) for which I need to run a mixed model with a group variable as a random factor.

The data are grouped by the column titled "Group Variable". The group variable designates individual plants.

I applied an experimental treatment to two branches of each plant, evaluating two other branches on each plant as controls (this is the independent variable/treatment factor). The basic idea here is that I wanted to evaluate how many flowers became fruit. So the treatment was adding extra pollen to the flowers on two branches of each plant and counting the flowers and fruit on those branches and also counting the flowers and fruit two control branches as well per plant. In this data, the proportion of flowers that became fruit is what is reported as the dependent variable.

So the dependent variable is the proportion of flowers that became fruit on each branch.

I'm trying to run a mixed model in Stata, and have used the xtreg, xtmixed, and mixed commands.

As you can tell if you run xtreg, the residuals are weakly normal (as determined by the sfrancia command—Royston's V'). But I'm unsure of how to run a homoscedasticity test using xtreg. I am also not completely certain that my model checks out against the other assumptions of xtreg, xtmixed, and mixed.

So for example, I have run these models:

xtset Group

xtreg Dependent Independent, mle [but I am unsure if mle is the correct option here]

xtmixed Dependent Independent || Group: ,mle [again, unsure of maximum likelihood here vs the other options]

(same for "mixed")

I have also used the xtmelogit function using a different dependent variable. Since the dependent variable as uploaded in the data file is a proportion, I ran xtmelogit with the two parts of the proportion as well (fruit as the dependent variable and then the option ",binomial(flowers)"), but I am unsure how to interpret the output of that. I say this just in case xtmelogit is the best option, in which case I can upload a new set of data with the two parts that make up the proportion. But I'm wondering if it is possible to use the proportion itself.

If xtreg/xtmixed/mixed are appropriate, I'm wondering how to evaluate whether the model meets the assumptions required by these models as the postestimation commands are unfamiliar to me for these functions. I say that hoping that I can use untransformed variables to make the interpretation more straightforward for readers. It seems to me that if transformations are required to meet the model assumptions of a linear model, it would perhaps be better to use xtmelogit (or perhaps another function I am unaware of). But I am unsure, and advice about this would be greatly appreciated.

Thank you,

Tyler

More Tyler Bateman's questions See All
Similar questions and discussions