[R-sig-ME] Fwd: GLM-normal distribution
Marcos Monasterolo
mmonasterolo at agro.uba.ar
Tue Apr 4 23:15:05 CEST 2017
Dear all. I am doing an analysis on proportion data resulting from counts.
As I do have the count data available I am running a glm with binomial
distribution. However, after realizing the response variable is normal
(Anderson-Darling test did not reject normality of the calculated
proportions) I am now having second thoughts as to whether it might also be
possible to run a normal lm with proportion as the response variable. The
thing is one of the explanatory variables ("ancho", which I am really
interested in) is not significant in the binomial glm but significant in
the lm. My understanding is that I should stick with the binomial GLM, but
I wanted to have an expert opinion on this.
I provide a working code below. Thanks in advance for your help.
Marcos
id <- "0B6X3EoqLHXG-dnZqTXpWSkRPYkE" # google file ID
mis.datos <- read.table(sprintf("https://docs.google.com/uc?id=%s&
export=download", id), header = TRUE,sep=";",dec=",")
mis.datos1<-mis.datos[-c(3,6,7,8),] #these data points I don't need
library(nortest)
ad.test(mis.datos1$propexot)#evaluate normality
hist(mis.datos1$propexot)
library(lme4)
M1 <- glm(cbind(exot, nativ) ~ anchom + tipdecamp + exph500, data =
mis.datos1, family =binomial)# the syntax of my model
summary(M1)
----
Biól. Marcos Monasterolo
Becario doctoral - Cátedra de Botánica General, Facultad de Agronomía, UBA
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list