| getStarts | R Documentation |
This function provides a named vector of starting values for a given
unmarked model, to serve as a guide for providing your own starting values.
To use it, write the code to fit an unmarked model and then wrap the code
in getStarts() (see example below). Note that due to environment/scoping
issues, this function may not work if you call it from inside other functions.
getStarts(code)
code |
A line of R code creating an |
A named vector showing the correct order of starting values
# Create unmarkedFrame
data(frogs)
pferUMF <- unmarkedFrameOccu(pfer.bin)
siteCovs(pferUMF) <- data.frame(sitevar1 = rnorm(numSites(pferUMF)))
obsCovs(pferUMF) <- data.frame(obsvar1 = rnorm(numSites(pferUMF) * obsNum(pferUMF)))
# Get correct sequence of starting values for model
getStarts(occu(~ obsvar1 ~ 1, pferUMF))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.