Gamma {kDGLM} | R Documentation |
Creates an outcome with gamma distribution with the chosen parameters (can only specify 2).
Gamma(
phi = NA,
mu = NA,
alpha = NA,
beta = NA,
sigma = NA,
data,
offset = as.matrix(data)^0
)
phi |
character or numeric: Name of the linear predictor associated with the shape parameter of the gamma distribution. If numeric, this parameter is treated as known and equal to the value passed. If a character, the parameter is treated as unknown and equal to the exponential of the associated linear predictor. It cannot be specified with alpha. |
mu |
character: Name of the linear predictor associated with the mean parameter of the gamma distribution. The parameter is treated as unknown and equal to the exponential of the associated linear predictor. |
alpha |
character: Name of the linear predictor associated with the shape parameter of the gamma distribution. The parameter is treated as unknown and equal to the exponential of the associated linear predictor. It cannot be specified with phi. |
beta |
character: Name of the linear predictor associated with the rate parameter of the gamma distribution. The parameter is treated as unknown and equal to the exponential of the associated linear predictor. It cannot be specified with sigma. |
sigma |
character: Name of the linear predictor associated with the scale parameter of the gamma distribution. The parameter is treated as unknown and equal to the exponential of the associated linear predictor. It cannot be specified with beta. |
data |
numeric: Values of the observed data. |
offset |
numeric: The offset at each observation. Must have the same shape as data. |
For evaluating the posterior parameters, we use the method proposed in Alves et al. (2024).
For the details about the implementation see dos Santos et al. (2024).
An object of the class dlm_distr
Mariane
Branco Alves, Helio
S. Migon, RaĆra Marotta, Junior,
Silvaneo
Vieira dos Santos (2024).
“k-parametric Dynamic Generalized Linear Models: a sequential approach via Information Geometry.”
2201.05387.
Junior,
Silvaneo
Vieira dos Santos, Mariane
Branco Alves, Helio
S. Migon (2024).
“kDGLM: an R package for Bayesian analysis of Dynamic Generialized Linear Models.”
Other auxiliary functions for a creating outcomes:
Multinom()
,
Normal()
,
Poisson()
,
summary.dlm_distr()
structure <- polynomial_block(mu = 1, D = 0.95)
outcome <- Gamma(phi = 0.5, mu = "mu", data = cornWheat$corn.log.return[1:500]**2)
fitted.data <- fit_model(structure, corn = outcome)
summary(fitted.data)
plot(fitted.data, plot.pkg = "base")