R - glm - how to deal with missing values I am looking at the effect of fertiliser on plant nutrients.
One column is fertiliser type (ntype), there are 4 options: AS, SN, OR, and None.
For each type there are different amounts/quantities (nquant):

*

*AS: 48, 96, 144

*SN: 48, 96

*None: 0

*OR: this is where the problem lies, we don't know how much is in OR, it is an unknown (currently left as blank/NA values).

The model I was attempting was looking at fibre and these fertilisers:
summary(glm(fibre~(ntype/nquant),data=mydata))

The issue is, if I run this, the model appears to ignore OR and we get as below. How should I treat this? I will be adding some extra terms to the model (binary inputs and year).
I also don't understand why nformAS isn't a row - are the other 3 are being compared to that?
Many thanks.


*

*Yes, your model omits the first category of the categorical variable ("AS") and that's what Intercept is for; the other categories are compared to the first one, as you correctly guessed.


*Your response variable: if it is percentage, you probably need logistic regression (family binomial) with two response variables which create the ratio; or, use lm and normal regression, but certainly not the default family=poisson which you are using when you not specify the family parameter.
Don't know about the nesting. It looks like R didn't accept the NA values and removed them.
