Hello, I am trying to run multiple glm models for a dataset and need some
help
First, i generated a matrix of abundance for 10000 populations based on the
mean and variance of my dataset
X <- replicate(10000, rpois(50, 9.244655))
and entered the years as row names
Y <- c(1960:2009)
rownames(X)<-Y
Now my issue is that I want to run a glm on each of those columns. However
I cannot just run glm(X~Y)
"Error: (subscript) logical subscript too long"
I know I can run individual column glms
X_glm <- glm(X[,1]~Y)
but would rather not do that 10000 times.
Any suggestions?
Thank you for any help.
Nick.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.