loglik | R Documentation |
Maximum Likelihood Estimation for irregular autoregressive (iAR) models, supporting different distribution families: normal ('iAR'), t ('iAR-T'), and gamma ('iAR-Gamma').
loglik(x, ...)
x |
An object of class
|
... |
Additional arguments (unused). |
This method estimates the parameters of an iAR model using the Maximum Likelihood Estimation (MLE) approach. Depending on the chosen distribution family, the corresponding likelihood function is maximized:
"norm" maximizes the likelihood for a normally-distributed series.
"t" maximizes the likelihood for a t-distributed series.
"gamma" maximizes the likelihood for a gamma-distributed series.
The function updates the iAR
object with the estimated parameters, the log-likelihood value, and a summary
table that includes standard errors and p-values.
An updated iAR
object with the following additional attributes:
coef
: Estimated model coefficients.
loglik
: Log-likelihood value of the model.
summary
: A summary table containing parameter estimates, standard errors, and p-values.
sigma
: For t and gamma families, the estimated scale parameter.
mean
: For the gamma family, the estimated mean parameter.
variance
: For the gamma family, the estimated variance parameter.
Eyheramendy_2018iAR
# Example: Estimating parameters for a normal iAR model
library(iAR)
times <- 1:100
model <- iAR(family = "norm", times = times, coef = 0.9, hessian = TRUE)
model <- sim(model) # Simulate the series
model <- loglik(model) # Estimate parameters using MLE
print(model@coef) # Access the estimated coefficients
print(model@loglik) # Access the computed log-likelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.