grad_sqr_diff.mnl: Provides analytical gradients for the squared differences...

View source: R/mu.mnl.R

grad_sqr_diff.mnlR Documentation

Provides analytical gradients for the squared differences optimization function with multinomial logit

Description

Provides analytical gradients for the squared differences optimization function with multinomial logit

Usage

grad_sqr_diff.mnl(x, mu, areas, targets, restrictions = NULL, cutoff = 0)

Arguments

x

Bias correction parameters

mu

Means of each class

areas

Vector of areas

targets

Targets to match

restrictions

Optional restrictions. Binary, if 1, the log-odds are set to zero

cutoff

Optional, defaults to zero. If set, all log-odds below cutoff are set to zero

Value

Vector of length J containing the gradients for each value of x.

Does not work for cutoff > 0 or with restrictions. Generates a warning if these are supplied.


tkrisztin/downscalr documentation built on June 2, 2025, 1:16 a.m.