emtd: Location and scale parameters estimation of a t distribution

View source: R/EMtdist.R

emtdR Documentation

Location and scale parameters estimation of a t distribution

Description

EM algorithm to estimate the location and scale of a t distribution for given degrees of freedom.

Usage

emtd(y, v, initmu = mean(y), inits = sd(y), tol = 1e-04)

Arguments

y

The data.

v

Degrees of freedom.

initmu

Initial value for the location parameter.

inits

Initial value for the scale parameter.

tol

Tolerance for the iterative procedure.

Details

By default the initial values are set to the sample mean and standard deviation.

Value

It returns the estimated location and scale parameters for each iteration.

Author(s)

Raúl Eyzaguirre.

Examples

y = c(10, 12, 16, 15, 15, 17, 20, 21, 16, 24, 13, 22, 14, 15, 16, 16, 17, 18, 19, 18, 23, 20, 30)
emtd(y, 10)

reyzaguirre/rhep documentation built on Dec. 2, 2024, 4:22 p.m.