om_rejection_optim: Optimize weights and G

View source: R/om_optim.R

om_rejection_optimR Documentation

Optimize weights and G

Description

Optimize weights and G

Usage

om_rejection_optim(
  weights,
  mat_g,
  ...,
  tot = 1,
  init_theta = NULL,
  uncons_theta = TRUE,
  par_optim = list()
)

Arguments

weights

vector of the original weights

mat_g

transition matrix G

tot

restrict on the sum of parameters

init_theta

initial values for theta. Default NULL, which will use 00000.1 fro all theta as initial values.

uncons_theta

whether theta are unconstrained. If TRUE, convert using exponential function. Example: (row tot - row sum fixed values) [e^a/(1+e^a+e^b) e^b/(1+e^a+e^b)]

par_optim

options for constrOptim function

Details

Parameters in weights and mat_g should be entered as NA. The constraints require all the parameter to be non-negative and each row in mat_g and weights have total 1.

Note that the first NA in each row of mat_g or weights are fixed values given the other elements in the row in order to satisfy the constraint that the sum is 1.


olssol/optMTP documentation built on March 30, 2022, 6:23 p.m.