Skip to main content
added 263 characters in body
Source Link

The estimators correspond to $(\mu,\sigma,\nu)$, the parameters of a Student-$t$ distribution with location parameter $\mu\in{\mathbb R}$, scale parameter $\sigma>0$ and $\nu>0$ degrees of freedom. This density is simply given by

$$f(x;\mu,\sigma,\nu)=\dfrac{1}{\sigma}\dfrac{\Gamma \left(\frac{\nu+1}{2} \right)} {\sqrt{\nu\pi}\,\Gamma \left(\frac{\nu}{2} \right)} \left(1+\dfrac{(x-\mu)^2}{\nu \sigma^2} \right)^{-\frac{\nu+1}{2}}.$$

There seems to be no closed expression for these estimators.

The warnings in this case are harmless. You can check this by finding the MLE using the command optim as follows

# log-likelihood function
loglik <-function(par){
if(par[2]>0 & par[3]>0) return(-sum(log(dt((alvsloss-par[1])/par[2],df=par[3])/par[2])))
else return(Inf)
}

# optimisation step
optim(c(0,0.1,2.5),loglik)

The following code shows how to plot the fitted density together with a kernel density estimator.

# fitted density
param = optim(c(0,0.01,2.5),loglik)$par
fit.den <- function(x) dt((x-param[1])/param[2],df=param[3])/param[2]

curve(fit.den,-0.15,0.15)
points(density(alvsloss),type="l",col="red")

The estimators correspond to $(\mu,\sigma,\nu)$, the parameters of a Student-$t$ distribution with location parameter $\mu\in{\mathbb R}$, scale parameter $\sigma>0$ and $\nu>0$ degrees of freedom. This density is simply given by

$$f(x;\mu,\sigma,\nu)=\dfrac{1}{\sigma}\dfrac{\Gamma \left(\frac{\nu+1}{2} \right)} {\sqrt{\nu\pi}\,\Gamma \left(\frac{\nu}{2} \right)} \left(1+\dfrac{(x-\mu)^2}{\nu \sigma^2} \right)^{-\frac{\nu+1}{2}}.$$

There seems to be no closed expression for these estimators.

The warnings in this case are harmless. You can check this by finding the MLE using the command optim as follows

# log-likelihood function
loglik <-function(par){
if(par[2]>0 & par[3]>0) return(-sum(log(dt((alvsloss-par[1])/par[2],df=par[3])/par[2])))
else return(Inf)
}

# optimisation step
optim(c(0,0.1,2.5),loglik)

The estimators correspond to $(\mu,\sigma,\nu)$, the parameters of a Student-$t$ distribution with location parameter $\mu\in{\mathbb R}$, scale parameter $\sigma>0$ and $\nu>0$ degrees of freedom. This density is simply given by

$$f(x;\mu,\sigma,\nu)=\dfrac{1}{\sigma}\dfrac{\Gamma \left(\frac{\nu+1}{2} \right)} {\sqrt{\nu\pi}\,\Gamma \left(\frac{\nu}{2} \right)} \left(1+\dfrac{(x-\mu)^2}{\nu \sigma^2} \right)^{-\frac{\nu+1}{2}}.$$

There seems to be no closed expression for these estimators.

The warnings in this case are harmless. You can check this by finding the MLE using the command optim as follows

# log-likelihood function
loglik <-function(par){
if(par[2]>0 & par[3]>0) return(-sum(log(dt((alvsloss-par[1])/par[2],df=par[3])/par[2])))
else return(Inf)
}

# optimisation step
optim(c(0,0.1,2.5),loglik)

The following code shows how to plot the fitted density together with a kernel density estimator.

# fitted density
param = optim(c(0,0.01,2.5),loglik)$par
fit.den <- function(x) dt((x-param[1])/param[2],df=param[3])/param[2]

curve(fit.den,-0.15,0.15)
points(density(alvsloss),type="l",col="red")
Source Link

The estimators correspond to $(\mu,\sigma,\nu)$, the parameters of a Student-$t$ distribution with location parameter $\mu\in{\mathbb R}$, scale parameter $\sigma>0$ and $\nu>0$ degrees of freedom. This density is simply given by

$$f(x;\mu,\sigma,\nu)=\dfrac{1}{\sigma}\dfrac{\Gamma \left(\frac{\nu+1}{2} \right)} {\sqrt{\nu\pi}\,\Gamma \left(\frac{\nu}{2} \right)} \left(1+\dfrac{(x-\mu)^2}{\nu \sigma^2} \right)^{-\frac{\nu+1}{2}}.$$

There seems to be no closed expression for these estimators.

The warnings in this case are harmless. You can check this by finding the MLE using the command optim as follows

# log-likelihood function
loglik <-function(par){
if(par[2]>0 & par[3]>0) return(-sum(log(dt((alvsloss-par[1])/par[2],df=par[3])/par[2])))
else return(Inf)
}

# optimisation step
optim(c(0,0.1,2.5),loglik)