Nothing
halft.mle <- function(x) {
fun <- function(para, n, x2) {
v <- exp(para[1]) ; s2 <- exp(para[2])
- n * lgamma(0.5 * v + 0.5) + n * 0.5 * log(v * pi * s2) + n * lgamma(0.5 * v) +
0.5 * (v + 1) * sum( log1p(x2/v/s2) )
}
n <- length(x)
x2 <- x^2
v <- Rfast::ct.mle(x)$nu
s2 <- Rfast::tmle(x, v = v)$param[2]
mod <- optim( c( log(v), log(s2) ), fun, n = n, x2 = x2, control = list(maxit = 5000) )
mod <- optim( mod$par, fun, n = n, x2 = x2, control = list(maxit = 5000) )
param <- exp(mod$par)
names(param) <- c("nu", "scatter")
list( param = param, loglik = -mod$value + n * log(2) )
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.