search for: modelfish

Displaying 1 result from an estimated 1 matches for "modelfish".

Did you mean: modelfile
2006 Feb 16
1
cv.glm function error message in a loop
...a dataframe with the first 227 columns with fish presence/absence data (=response), then 10 columns of predictor variables. Code that doesn't work: for (i in 1:length(datafish)) #this is 227 columns within "data" { #run glm & step of fish.[i] with all parameters no interactions modelfish<-glm(data[,i]~ECO.NAME+ISLAND+DISTANCE.EST+DEPTH500M, binomial) stepmodfi<-step(modelfish,trace=1,scope=list(lower= ~1, upper=~ECO.NAME+ISLAND+DISTANCE.EST+DEPTH500M) ,direction="both") #run cross-validation fish.vali<-cv.glm(data,stepmodfi) } Code for one fish that works: model...