loglik {iAR} | R Documentation |
Maximum Likelihood Estimation for iAR Models
Description
Maximum Likelihood Estimation for irregular autoregressive (iAR) models, supporting different distribution families: normal ('iAR'), t ('iAR-T'), and gamma ('iAR-Gamma').
Usage
loglik(x, ...)
Arguments
x |
An object of class
|
... |
Additional arguments (unused). |
Details
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.
Value
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.
References
Eyheramendy S, Elorrieta F, Palma W (2018). “An irregular discrete time series model to identify residuals with autocorrelation in astronomical light curves.” Monthly Notices of the Royal Astronomical Society, 481(4), 4311-4322. ISSN 0035-8711, doi:10.1093/mnras/sty2487, https://academic.oup.com/mnras/article-pdf/481/4/4311/25906473/sty2487.pdf.
Examples
# 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