| summary.maximisation {micEcon} | R Documentation |
Selects the appropriate information from maximisation algorithm, calculates standard errors and t-values, and presents in a suitable form.
summary.maximisation( object, hessian=FALSE, unsucc.step=FALSE, ... )
object |
optimisation result, object of class
maximisation. See maxNR. |
hessian |
logical, whether to display Hessian matrix. |
unsucc.step |
logical, whether to describe last unsuccesful step
if code == 3 |
... |
currently not used. |
Object of class summary.maximisation, intended to print with
corresponding print method. There are following components:
type |
type of maximisation. |
iterations |
number of iterations. |
code |
exit code (see maxNR.) |
message |
a brief message, explaining code. |
unsucc.step |
description of last unsuccessful step, only if
requested and code == 3 |
maximum |
function value at maximum |
estimate |
matrix with following columns:
|
hessian |
estimated hessian at maximum, only if requested |
Probabilities of t-values depend on several assumptions which may not be appropriate in the particular case!
Ott Toomet siim@obs.ee
## minimize a 2D quadratic function:
f <- function(b) { x <- b[1]; y <- b[2];
val <- (x - 2)^2 + (y - 3)^2
attr(val, "gradient") <- c(2*x - 4, 2*y - 6)
attr(val, "hessian") <- matrix(c(2, 0, 0, 2), 2, 2)
val
}
## Note that NR finds the minimum of a quadratic function with a single
## iteration. Use c(0,0) as initial value. Note that standard
## deviations, t-values and probabilities are not appropriate here.
result1 <- maxNR( f, theta = c(0,0) )
summary( result1 )
## Now use c(1000000, -777777) as initial value and ask for hessian
result2 <- maxNR( f, theta = c( 1000000,-777777 ) )
summary( result2 )