Skip to contents

Per-outcome contributions in the family's own parameter coordinates, with no constraint projection applied.

Usage

score(family, theta, x)

Arguments

family

A parametric_family.

theta

Parameter vector.

x

(M, K) matrix of outcomes.

Value

(M, d) matrix.

Examples

fam <- multinomial_family(n_trials = 4L, k = 3L)
score(fam, c(0.5, 0.3, 0.2), c(2L, 1L, 1L))
#>      [,1]     [,2] [,3]
#> [1,]    4 3.333333    5