estimateParam | R Documentation |
Parameter estimation minimizing the negative log likelihood, using the
nlminb function. estimateParam
uses data from commercial catches or surveys.
estimateMultidata
uses both sources
estimateParam(names = c("Fm", "Winf", "Wfs"),
data = simulateData3(parameters(), samplesize = 1000), start = rep(0.5,
length(names)), lower = rep(-Inf, length(names)), upper = rep(Inf,
length(names)), fixed.names = c(), fixed.vals = numeric(0),
fixed.transformed = TRUE, plotFit = FALSE, isSurvey = FALSE,
verbose = getOption("verbose"), useTMB = TRUE, ...)
estimateMultidata(names = c("Fm", "Winf", "Wfs"),
surdata = simulateData3(parameters(), samplesize = 1000, isSurvey =
TRUE)$sample, comdata = simulateData3(parameters(), samplesize =
1000)$sample, start = rep(0.5, length(names)), lower = rep(0.1,
length(names)), fixed.names = c(), fixed.vals = numeric(0),
plotFit = FALSE, ...)
names |
string vector, the parameters to be estimated. |
data |
numeric vector, or |
start |
numeric vector, initial values of the parameters. |
lower |
The lower bound for the parameter estimation. |
upper |
The upper bound for the parameter estimation. |
fixed.names |
String vector. Names of constants. |
fixed.vals |
Numeric vector. Transformed values of constants. |
fixed.transformed |
Logical. If FALSE the constants are not transformed. |
plotFit |
logical, if TRUE a plot is produced with the fited pdf and the kernel density estimate of the data. |
isSurvey |
logical, if TRUE the data are assumed to be from a survey. |
verbose |
logical, if TRUE the estimated confidence intervals are printed. |
useTMB |
logical, if TRUE TMB is used for parameter estimation |
... |
Additional named arguments passed to plotFit |
surdata |
Same as data. Survey data. |
comdata |
Same as data. Commercial data. |
link{Parameters}
object, containing the estimated parameters.
If data is a list containing both sample and df, the data.frame
df will be used.
alko
## Simulate some data
sam <- simulateData3(params=parameters("a", 0.5, transformed=FALSE))
## Estimate the a parameter and see the fitted plot
estimateParam(names="a", data=sam$sample, plotFit=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.