Unmarked MultinomPois model predictions

99 views
Skip to first unread message

K Womack

unread,
Feb 27, 2017, 11:04:21 AM2/27/17
to unmarked
Hi -

I am trying to make abundance predictions for bat species in Missouri. I have my top model and when I try to use the 'predict' fuction - I get an error 
"Error: ncol(coefficients) == length(obj@estimates) is not TRUE"

This is the code I am using and I am attaching the csv file I am importing into R:

predict_PESUgraph <-read.csv("G:/Chapter3/PESU_pred.csv")
 str(predict_PESUgraph)
 
 
 predictions_PESUG <-predict(pesu.H4, newdata=predict_PESUgraph,  type="state", appendData=TRUE)
 write.csv(predictions_PESUG, "CG:/Chapter3/PESU_pred_abund.csv")


Also- this is my top model and my unmarked dataframe: 

 pesu.H4<- multinomPois(~p ~SW1k+For1k+yr, data=pesudf)


###### Make the unmarked dataframe
 pesudf  <-  unmarkedFrameMPois(y=y2,
                                siteCovs=data.frame(yr, canopy, under, TPH11, TPH5, TPHs, edge, YRsinceB, 
                                                    FirePlot, Pprey, open1k, SW1k, For1k, pburned, FFreq1km, open16, urban16, forest16),
                                obsCovs=list(etemp=etemp, w=w, jul=jul, p=p, moon=moon, year=year),
                                type="removal")   #'obsToY' is created automatically, piFun is also created automatically
 str(pesudf)
 summary(pesudf)



Thanks!

Kathryn
PESU_pred.csv

Kery Marc

unread,
Feb 27, 2017, 12:11:03 PM2/27/17
to unmarked

Hi Kat,

 

Just a hunch – is one of the covariates a factor ?

 

Regards  -- Marc

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

K Womack

unread,
Feb 27, 2017, 12:41:35 PM2/27/17
to unmarked
Hi Marc,

Yes, and I have resolved the issue.

Thanks!

Kathryn

Kery Marc

unread,
Feb 27, 2017, 2:50:13 PM2/27/17
to unma...@googlegroups.com
Hi Kat,

and can you quickly report on what the problem was ?

Thanks and kind regards  --- Marc
Reply all
Reply to author
Forward
0 new messages