distr_score {gasmodel}R Documentation

Compute Score

Description

A function computing score or scaled score for a given distribution.

Usage

distr_score(y, f, distr, param = NULL, par_link = NULL, scaling = NULL)

Arguments

y

Observations. For an univariate distribution, a numeric vector. For a multivariate distribution, a numeric matrix with observations in rows or a numeric vector of a single observation.

f

Parameters. For the same parameters for all observations, a numeric vector. For individual parameters for each observation, a numeric matrix with rows corresponding to observations.

distr

A distribution.

param

A parametrization of the distribution.

par_link

An optional logical vector indicating whether the logarithmic/logistic link should be applied to restricted parameters in order to obtain unrestricted values. Defaults to keeping the original link for all parameters.

scaling

An optional scaling function for the score. The supported scaling functions are the unit scaling (scaling = "unit"), the inverse of the Fisher information matrix scaling (scaling = "fisher_inv"), and the inverse square root of the Fisher information matrix scaling (scaling = "fisher_inv_sqrt").

Value

The (scaled) score.

See Also

distr()

Examples

# Score for the negative binomial distribution
distr_score(y = c(1, 8, 5, 0, 0), f = c(13.50, 0.03), distr = "negbin")


[Package gasmodel version 0.6.0 Index]