fpiter {daarem} | R Documentation |
Fixed-Point Iteration Scheme
Description
A function to implement the fixed-point iteration algorithm. This includes monotone, contraction mappings including EM and MM algorithms
Usage
fpiter(par, fixptfn, objfn=NULL, control=list( ), ...)
Arguments
par |
A vector of parameters denoting the initial guess for the fixed-point iteration. |
fixptfn |
A vector function, |
objfn |
This is a scalar function, $L$, that denotes a ”merit”
function which attains its local minimum at the fixed-point of $F$.
This function should accept a parameter vector as input and should
return a scalar value. In the EM algorithm, the merit function |
control |
A list of control parameters to pass on to the algorithm. Full names of control list elements must be specified, otherwise, user-specifications are ignored. See *Details* below. |
... |
Arguments passed to |
Details
control
is list of control parameters for the algorithm.
control = list(tol = 1.e-07, maxiter = 1500, trace = FALSE)
tol
A small, positive scalar that determines when iterations
should be terminated. Iteration is terminated when
||x_k - F(x_k)|| \leq tol
.
Default is 1.e-07
.
maxiter
An integer denoting the maximum limit on the number of
evaluations of fixptfn
, F
. Default is 1500
.
trace
A logical variable denoting whether some of the intermediate
results of iterations should be displayed to the user.
Default is FALSE
.
Value
A list with the following components:
par |
Parameter, |
value.objfn |
The value of the objective function |
fpevals |
Number of times the fixed-point function |
objfevals |
Number of times the objective function |
convergence |
An integer code indicating type of convergence.
|
See Also
Examples
### Generate outcomes from a probit regression model
n <- 1000
npars <- 5
true.beta <- .5*rt(npars, df=2) + 1
XX <- matrix(rnorm(n*npars), nrow=n, ncol=npars)
yy <- ProbitSimulate(true.beta, XX)
max.iter <- 1000
beta.init <- rep(0.0, npars)
### EM algorithm for estimating parameters from probit regression
em.probit <- fpiter(par=beta.init, fixptfn = ProbitUpdate, X=XX, y=yy,
control=list(maxiter=max.iter))