Greetings Ian and Richard,
I am just wondering if there are any plans to developing a predict() function for use with colext objects in future versions of unmarked? Thank you.
Kind regards,
Ben
The two relevant help pages are:
help("unmarkedFit-class")
help(linearComb)
They could use some work, but in there you will see that there is a
_names_ method that returns the names of the parameter types. So:
> names(fm.yearly)
[1] "psi" "col" "ext" "det"
After you decide which type of prediction you want, you need to give
linearComb specific covariate values (2nd argument).
lc <- linearComb(fm.yearly, c(1,0,1,0,0,0), type="ext") # is equivalent to:
lc <- linearComb(fm.yearly, coefficients=c(Int=1, year2=0, year3=1,
year4=0, year5=0, year6=0), type="ext")
Note that coefficients can be a properly formatted design matrix too.
The only advantage of the _predict_ method is that it creates the
design matrix for you. Hopefully this will be part of the next
release...sometime in the Fall maybe.
Richard
Quoting Giancarlo Sadoti <gcsa...@gmail.com>:
> Hi Richard and Ian,
>
> Your reply to Ben helps me understand things, but can you enlighten me
> a bit further on the syntax for using linearcomb()?
>
> e.g, lc <- linearComb(fm.yearly, c(1,0,1,0,0,0), type="col")
>
> I've used predict() to get occupancy probabilities from occu models
> (thanks for including this).
>
> I have a two season design and would like to estimate probabilities of
> both colonization and extirpation. (e.g., is type='removal' for
> extirpation?)
>
> Thanks for all you've done with this package. It has saved me time
> beyond measure!
>
> Giancarlo
>
>
> On May 13, 12:21 pm, rchand...@nrc.umass.edu wrote:
>> I will put that on the to-do list. In the meantime, note that predict
>> is basically just a convenience wrapper for linearComb. See
>> ?linearComb for examples of getting predictions without predict. And
>> continuing with the colext example, you can do something like this:
>>
>> # Logit-scale estimate of colonization prob in year 3
>> lc <- linearComb(fm.yearly, c(1,0,1,0,0,0), type="col")
>>
>> # Back-transform it and get confidence interval
>>
>> confint(backTransform(lc))
>>
>> Richard
>
--
Richard Chandler