Displaying 1 result from an estimated 1 matches for "wholearea".
2008 Oct 15
2
apply model predictions over larger area with predict()
...er of rows for
old and new data do not match.
the script looks like that:
model<-glm(species~temp+prec+elev,family=binomial(link=logit))
#whereby temp,prec,elev are in vector format and contain the elements
on species presence/absence; species is vector of 0's and 1's
(length=319)
wholearea<-data.frame(cbind(as.vector(temperature),as.vector
(precipitation),as.vector(elevation)) # (length=7526)
predict(model, newdata=wholearea,type="response")
Warning message: 'newdata' had 7526 rows but variable(s) found have
319 rows.
Ive searched quite a while for the answe...