search for: stepmodfi

Displaying 2 results from an estimated 2 matches for "stepmodfi".

2006 Feb 16
1
cv.glm function error message in a loop
...onse), 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: modelfish.355<-glm(fi355~ECO.NAME+ISLAND+DISTANCE.EST+DEPTH500M, binomial, data...
2008 May 28
1
confidence interval for the logit - predict.glm
...there is some controversy going on about this). I have got a data set that is called "testfishes.txt", "predy.txt" contains the predictors for the testfishes only and "predallx.txt" contains all predictors for all planning units. I used the following commands: "stepmodfi" is the output of the stepwise approach predictionlogit <- predict(stepmodfi, predallx, type="link", se.fit=TRUE) upperlogit <- predictionlogit$fit + 2*predictionlogit$se.fit lowerlogit <- predictionlogit$fit - 2*predictionlogit$se.fit upperresponse[,i] <- exp(upperlog...