Hi all, sorry this is a bit of a simple question - I'm confused with exactly how linear combinations work when there are covariates included in the model.
For my model fm5 I have created a linear combinations matrix based on the ovenbird example. Basically what I am interested in calculating is the estimated abundance at set distances from a release site. The covariate 'Location' however is a category, so I just wanted to check if the code I have used below is correct:
> fm5<-pcount(~start~Location+Prox.Release.Site..m.,umf,K=5)
>(lc<-linearComb(fm5, type = "state",
+ + matrix(c(1, 1, 0, 1, 1, 10), 2, 3, byrow = TRUE)))
Linear combination(s) of Abundance estimate(s)
Estimate SE (Intercept) LocationRelease.Area Prox.Release.Site..m.
1 1.054 0.594 1 1 0
2 0.906 0.526 1 1 10
Also I have run a separate model, this one however has more covariates present (most of which are categories), and I am unsure how to get the linear combinations matrix to work as I keep getting an error message:
fm6<-pcount(~temp+duration+start+wind~Location+Dominant.Veg, umf, K=60)
> (lc<-linearComb(fm6, type = "state",
+ matrix(c(1, 0, 0, 1, 0, 0), 2, 3, byrow = TRUE)))
Error: ncol(coefficients) == length(obj@estimates) is not TRUE
Can anyone explain how linear combinations work and how to create the matrices correctly?
Thanks a lot,
Sarah
--
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/groups/opt_out.