Description Usage Arguments Details Value Author(s) See Also Examples
Return a logical vector, indicating which parameters were free under
maximisation, as opposed to the fixed parameters that are treated as
constants. See argument “fixed” for maxNR
.
1 2 3 |
x |
object, created by a maximisation routine, or derived from a maximisation object. |
... |
further arguments for methods |
Several optimisation routines allow the user to fix some parameter values (or do it automatically in some cases). For gradient or Hessian based inference one has to know which parameters carry optimisation-related information.
A logical vector, indicating whether the parameters were free to change during optimisation algorithm.
Ott Toomet
1 2 3 4 5 6 7 8 9 10 11 | # a simple two-dimensional exponential hat
f <- function(a) exp(-a[1]^2 - a[2]^2)
#
# maximize wrt. both parameters
free <- maxNR(f, start=1:2)
summary(free) # results should be close to (0,0)
activePar(free)
# keep the first parameter constant
cons <- maxNR(f, start=1:2, fixed=c(TRUE,FALSE))
summary(cons) # result should be around (1,0)
activePar(cons)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.