Error: plotting model averaged estimates against covariates

Hi,
I'm trying to plot model averaged estimates for psi and p against various covariates using the predict function to get a smooth surface. I have no problems using modavg function with the predict argument with example data using code like
psi.ma<-modAvg(aic.tab=results,param="psi",
predict=TRUE,newdata=landscape)
However, when I try to run a similar code with my data and AIC output I consistently get an error:
" Error in pred.mat %*% coeff : non-conformable arguments".
I have designed the newdata to match the structure of the initial dataset, same length and all the same unitcov names. I have tried everything I can think of but cannot get the error to go away and for the predict function to work.
Does anyone have any ideas what could be causing the problem? This is my newdata and Modaveraged predict code :
new.data<-data.frame(hab=c("alluvialbench","uplandgranite","lowlandsandstone","peatswamp","freshwaterswamp"),
z_pheno=seq(min(BP$unitcov$z_pheno), max(BP$unitcov$z_pheno), length=2500), z_elev=seq(min(BP$unitcov$z_elev),
max(BP$unitcov$z_elev), length=2500), z_elev_sq=seq(min(BP$unitcov$z_elev_sq), max(BP$unitcov$elev_sq), length=2500),
h_index=seq(min(BP$unitcov$h_index), max(BP$unitcov$h_index), length=2500), effort=seq(min(BP$unitcov$effort), max(BP$unitcov$effort), length=2500),
off_trail_=c(0,1), time=seq(min(BP$unitcov$time), max(BP$unitcov$time), length=2500))
new.ma.psi<-modAvg(aic.tab =bporesults,param = "psi", predict=TRUE, newdata = new.data )
Thanks,
-Rachel
I'm trying to plot model averaged estimates for psi and p against various covariates using the predict function to get a smooth surface. I have no problems using modavg function with the predict argument with example data using code like
psi.ma<-modAvg(aic.tab=results,param="psi",
predict=TRUE,newdata=landscape)
However, when I try to run a similar code with my data and AIC output I consistently get an error:
" Error in pred.mat %*% coeff : non-conformable arguments".
I have designed the newdata to match the structure of the initial dataset, same length and all the same unitcov names. I have tried everything I can think of but cannot get the error to go away and for the predict function to work.
Does anyone have any ideas what could be causing the problem? This is my newdata and Modaveraged predict code :
new.data<-data.frame(hab=c("alluvialbench","uplandgranite","lowlandsandstone","peatswamp","freshwaterswamp"),
z_pheno=seq(min(BP$unitcov$z_pheno), max(BP$unitcov$z_pheno), length=2500), z_elev=seq(min(BP$unitcov$z_elev),
max(BP$unitcov$z_elev), length=2500), z_elev_sq=seq(min(BP$unitcov$z_elev_sq), max(BP$unitcov$elev_sq), length=2500),
h_index=seq(min(BP$unitcov$h_index), max(BP$unitcov$h_index), length=2500), effort=seq(min(BP$unitcov$effort), max(BP$unitcov$effort), length=2500),
off_trail_=c(0,1), time=seq(min(BP$unitcov$time), max(BP$unitcov$time), length=2500))
new.ma.psi<-modAvg(aic.tab =bporesults,param = "psi", predict=TRUE, newdata = new.data )
Thanks,
-Rachel