# How can I improve this glm and do I need to dummy code?

I have percentage disease data taken from leaves of wheat in a disease trial which were artificially inoculated with isolates of disease from different source plants.

The basic question is, are disease isolates sourced from the same cultivar better at infecting those cultivars? We are looking for an interaction. I am trying to conduct a logit linked beta glm to determine if there is an interaction between the source cultivar variable and the inoculated host cultivar variable.

My model looks something like this:

beta_model=betareg(mean.proportion.disease ~ Source.CV + inoculant.Host +
Source.CV*Inoculant.Host, data = study, link =c('logit'))


I have also tried a binomial glm:

binom_model = glm(mean.proportion.disease ~ Source.CV + inoculant.Host +
Source.CV*Inoculant.Host,
data = study, family = binomial(link = 'logit'))


Both models give me residuals that look like this:

Is there any way I can improve on this and get normal residuals? I might also be worth noting that there are a few zeros in my data so proportions are transformed according to: $(y*(n-1)+0.5)/n)$.

Lastly, you've probably already guessed I am a beginner in this realm of statistics, and as such I'm thinking about glm's in the context of simple linear regression. So I can't really understand what the intercept in glm output is telling me, if anyone can help me with this I'd very grateful.

• Given the name of you outcome variable, mean.proportion.disease, and the beta-distribution tag, I assume that this variable is measured on a 0-1 scale. So may I ask why you are using logit here? Commented Oct 28, 2015 at 12:25
• To me it looks like there are naturally occurring groupings in the data that need to be accounted for by your model. Can you relate these residuals back to their source? Commented Oct 28, 2015 at 12:25
• thank you for your comments. the groupings probably relate to the three inoculant host plants used in the trial. there were three, one very susceptible to the disease, one moderately resistant, and one very resistant. this would result in proportions that could be grouped as high, medium, and low. variance about these proportions probably reflect this. in answer to why i used logit i'm afraid i must plead ignorance, this model has been succesfully constructed in sas by our resident statistician, and i am now trying to implement it in r as i know nothing about sas. in his sas he used logit. Commented Oct 28, 2015 at 12:40
• A logit link is perfectly acceptable for modelling a percent or proportion, even one that is continuous. If some previous comments are implying that you must have 0, 1 data, that is not the case. Commented Oct 28, 2015 at 14:51
• It looks as if you are already averaging somehow, because your response is mean.proportion.disease. Is that so? Otherwise put, what is a data point, or a raw observation? Is it a leaf, diseased or not? Commented Oct 28, 2015 at 16:57

In your case, "typical" regression methods aren't appropriate since your dependent variable is bounded below at 0 and above at 1. You probably want to consider some type of truncated regression appropriate for limited dependent variables such as this. Here's a Wiki reference that has some use in explaining the motivations for using these functional forms:

https://en.wikipedia.org/wiki/Truncated_regression_model

Broadly speaking, truncated regression is a subset of generalized linear modeling whose development spans separate disciplines such as biology, economics and statistics. Maddala's more than 30 year old book Limited-Dependent and Qualitative Variables in Econometrics is the canonical source for a discussion of these topics:

http://www.amazon.com/Limited-Dependent-Qualitative-Econometrics-Econometric-Monographs-ebook/dp/B00IE6MRUI/ref=sr_1_1?s=books&ie=UTF8&qid=1446038429&sr=1-1&keywords=qualitative+and+limited+dependent+variables

However, it's a field that has exploded since his book was written and I would be hard-pressed to give you a single reference that summarizes all of the issues, particularly from a bio-statistics POV.

One tip would be to look into beta-binomial models which are a form of probabilistic (i.e., bounded or truncated) modeling that may be appropriate for your percentages. This could leverage an R module designed to integrate the compound function, as opposed to two separate modules as developed here:

https://cran.r-project.org/web/packages/bbmle/vignettes/mle2.pdf

• But the OP is not using typical regression methods at all. The logit link is tailor-made for the bounds of [0, 1] or [0, 100%]. I think you need a really strong case that truncated regression is even competitive with that kind of approach, let alone superior. The answer doesn't really address this comparison. Moreover, truncated regression can, I suggest, only with extreme difficulty be shoe-horned into the generalized linear model framework: what link function would you say it was using? Commented Oct 28, 2015 at 14:49
• (Naturally other links such as probit, loglog, cloglog could also make sense for bounded proportions.) Commented Oct 28, 2015 at 15:03
• In short, no. You have already sprinkled many of your answers and comments on CV with candid criticisms of various kinds and given that you reasonably ask me to clarify, then I will do the same here. My own opinion is that only the beta-binomial suggestion in your answer looks at all related to the question. The other comments on truncated regression are, it seems, based on misreading the question or to me not yet shown to be related to the question. Any function for a response that doesn't change behaviour as it approaches result 0 or result 1 is utterly unbiological (in this case). Commented Oct 28, 2015 at 15:42
• I think it would be difficult to make a case that a truncated regression model is appropriate for such data, but maybe I have overlooked some nuance. Is there any truncation mechanism at work here? Or are you proposing this model not because it is suggested by the circumstances, but simply because maybe it would work? In either case, it would seem important to provide some elaboration. (cc @NickCox)
– whuber
Commented Oct 28, 2015 at 16:33
• Ah! "Truncation mechanisms" That focuses the discussion on the real merits of the suggestion. No, there doesn't seem to be a truncation mechanism at work here, merely that the data is bounded at 0 and 1. Thanks. Commented Oct 28, 2015 at 16:53