fit.mstil: This function finds the maximum penalised quasi likelihood...

Description Usage Arguments Details Value Examples

View source: R/fit.mstil.R

Description

This function finds the maximum penalised quasi likelihood estiamtes for mstil.

Usage

1
fit.mstil(x, param = NULL, show.progress = TRUE, control = list())

Arguments

x

matrix of quantiles of size n x k. Each row is taken as a quantile.

param

list of inital parameters, contains lambda, delta, Ainv, and nu.

show.progress

logical value. If TRUE, progress of the algorithm will be printed in console. By default TRUE.

control

list of control variables, see 'details'.

Details

The control argument is a list that accepts the following components.

numLikSample

a positive integer, represents the number of samples used to estimate the density and log-likelihood functions. By default 1e6.

conLevel

a value between 0.5 and 1, represents the confidence level of the log-likelihood to be calculated. By default 0.95.

cvgN

a positive interger. The algorithm stops when the estimated log-likelihood is not improved in cvgN iterations. By default 5.

lambdaPenalty

a positive value, represents the L2 penalty coefficient for lambda. By default 0.

ainvPenalty

a positive value, represents the L2 penalty coefficient for Ainv. By default 0.

maxit

a positive integer, represents the maximum number iterations allowed. By default 0.

maxitOptim

maximum number of iterations in optim. By default 10.

numGradSample

a positive integer, represents the number of samples used to estimate the gradient. By default 1e4.

finDiffStep

a positive value, represents the step size used to estimate gradient w.r.t. nu. By default 1e-5.

stepSgd

a positive value, represents the step size to be used in the stochastic gradient step to optimise nu. By default 1e-2.

iterSgd

a positive integer, represents the number of iterations to be used in the stochastic gradient step to optimise nu. By default 1e2.

dimRateSgd

a positive value, represents the diminishing rate for step size to be used in the stochastic gradient step to optimise nu. By default 1e-2.

batchSize

a positive integer, represents the batch sample size. By default n.

Value

a list with components:

logLik

a vector of estimated values of the log-likelihood function after each itereation.

par

a list of lists of fitted parameters after each iteration.

logLikLower

a vector of the lower bound of the estimated log-likelihood function after each iteration.

logLikUpper

a vector of the upper bound of the estimated log-likelihood function after each iteration.

time

a vector recorded the time elapsed after each iteration.

Examples

1
2
3
# Not run:
# data(RiverFlow)
# fit.mstil(as.matrix(log(RiverFlow)))

henrylobster/mstil documentation built on Sept. 25, 2020, 3:48 p.m.