Learn R Programming

tpn (version 1.8)

est.stpn: Parameter estimation for the stpn model

Description

Perform the parameter estimation for the slash truncated positive normal (stpn) discussed in Gomez, Gallardo and Santoro (2021) based on the EM algorithm. Estimated errors are computed based on the Louis method to approximate the hessian matrix.

Usage

est.stpn(y, sigma0=NULL, lambda0=NULL, q0=NULL, prec = 0.001, 
     max.iter = 1000)

Value

A list with the following components

estimate

A matrix with the estimates and standard errors

iter

Iterations in which the convergence were attached.

logLik

log-likelihood function evaluated in the estimated parameters.

AIC

Akaike's criterion.

BIC

Schwartz's criterion.

Arguments

y

the response vector. All the values must be positive.

sigma0, lambda0, q0

initial values for the EM algorithm for sigma, lambda and q. If they are omitted, by default sigma0 is defined as the root of the mean of the y^2, lambda as 0 and q as 3.

prec

the precision defined for each parameter. By default is 0.001.

max.iter

the maximum iterations for the EM algorithm. By default is 1000.

Author

Gallardo, D.I. and Gomez, H.J.

Details

A variable has stpn distribution with parameters \(\sigma>0, \lambda \in\) R and \(q>0\) if its probability density function can be written as $$ f(y; \sigma, \lambda, q) = \int_0^1 t^{1/q} \sigma \phi(y t^{1/q} \sigma-\lambda)dt, y>0, $$ where \(\phi(\cdot)\) denotes the density function for the standard normal distribution.

References

Gomez, H., Gallardo, D.I., Santoro, K. (2021) Slash Truncation Positive Normal Distribution: with application using the EM algorithm. Symmetry, 13, 2164.

Examples

Run this code
set.seed(2021)
y=rstpn(n=100,sigma=10,lambda=1,q=2)
est.stpn(y)

Run the code above in your browser using DataLab