powLawMixIndepNegLogLik: Power law with mixed ordinal and continuous observations

Description Usage Arguments Details Author(s)

View source: R/powLawMix.R

Description

powLawMixNegLogLik calculates the negative log-likelihood. powLawMixGradNegLogLik calculates the gradient of the negative log-likelihood. extract_th_v extracts the parameterization for a single ordinal variable from the parameter vector th_y. extract_th_w extracts the parameterization for a single continuous variable from the parameter vector th_y. simPowLawMix creats simulated data for a conditionally independent, mixed model

Usage

1
powLawMixIndepNegLogLik(th_y, x, Y, modSpec, transformVar = F)

Arguments

th_y

Parameter vector with ordering th_y = [rho,tau,a,r,b,s,kappa]

x

Vector of independent variable observations

modSpec

Model specification that, among other things, specifies how to unpack th_y

vstar

Vector of latent dependent variable observations (for v^*)

v

Vector of dependent variable observations (ordinal)

w

Vector of dependent variable observations (continuous)

rho

Scaling exponent (ordinal)

a

Multiplicative coefficient (continuous)

r

Scaling exponent (continuous)

b

Offset (continuous)

s

Baseline noise

kappa

Slope of noise [Optional]

hetero

Whether the model is heteroskedastic [Default FALSE]

Details

We assume a mixture of J ordinal variables as described in yada::powLawOrd and K continuous variables as described in yada::powLaw. The calculation of the mean and scale term on the noise, s, is unchanged for the mixed case. The scaling term, kappa, is can be flexibly specified. The ordering of the complete parameter vector th_y is

th_y = [rho,tau,a,r,b,s,kappa]

The length of each vector in th_y is

Variable Length rho J tau M1 + M2 + ... + Mj + ... + MJ, where Mj+1 is the number of ordinal categories for the j-th ordinal variable a K r K b K s J + K kappa length(unique(modSpec$hetGroups))

The extension of the negative log-likelihod calculation from the single variables case ordinal/continuous case to the multi-variable mixed case is straightforward: each variable contributes independently to the sum. Extension of the gradient calculation is similarly straightforward: aside from kappa, which is flexibly specified, the calculation is unchanged. For kappa, a sum across variables is needed.

Author(s)

Michael Holton Price <MichaelHoltonPrice@gmail.com>


eehh-stanford/yada documentation built on June 18, 2020, 8:05 p.m.