I'm trying to fit a removal model and I keep getting the following error message:
Error in dpois(x, lambda, log) :
Non-numeric argument to mathematical function
Anyone know what this is about?Thanks!Joe
Thanks Richard;
Here’s the code:
bwhistory=read.table(file = "bwmatrix.txt", colClasses = "character", sep = "\t")
bwmatrix= as.matrix(bwhistory) #Creates matrix from imported data
bwsitecov=read.table(file = "bwsitecov.txt", header = TRUE, sep = "\t")
bwobscov=read.table(file = "bwobscov.txt", header = TRUE, sep = "\t")
bwFrame <- unmarkedFrameMPois(y=bwmatrix, siteCovs=bwsitecov,
type="removal") #need to add observation level covariates
# fit models
fm.bw.1 = multinomPois(~1 ~1, bwFrame)
Attached are the 3 txt files I’m using. I’m having trouble getting unmarkedFrameMPois to work when I specify obsCovs too.
Any help is greatly appreciated!
Joe
Joseph D. Clark, Ph.D.
Branch Chief
USGS Southern Appalachian Research Branch
274 Ellington Plant Sciences Building
University of Tennessee
Knoxville, TN 37996
Richard:
You could have made me feel a little better if you’d taken longer to fix this! Really, thanks for your help.