Learn R Programming

inferference (version 0.4.61)

logit_integrand: Default integrand for the group-level propensity score

Description

Computes the following function: $$\prod_{j=1}^{n} (r h_{j}(b))^{A_j} (1 - r h_{j}(b))^{1 - A_j} f_b(b; \theta_b)$$ where $r$ is the randomization scheme. $X$ is the covariate(s) vectors. $fixef$ is the vector of fixed effects. $b$ is the random (group-level) effect. $ranef$ is the random effect variance.

Usage

logit_integrand(b, X, A, fixed.effects, random.effects = NULL, x = NULL,
  pos = NULL, allocation = NULL, randomization = 1,
  integrate.allocation = FALSE)

Arguments

b
vector argument of values necessary for integrate.
X
n by length(fixed.effects) matrix of covariates.
A
vector of observed treatments (0,1)
fixed.effects
vector of fixed effect parameters.
random.effects
OPTIONAL vector of random effect parameters. If provided, only the first element is used. If this element is
x
Used by grad for taking the derivative with respect an element of params. Only used if pos is not NULL.
pos
The position of theta for which to take the derivative. Defaults to NULL.
allocation
The allocation strategy. Required if include.allocations == TRUE. Defaults to NA.
randomization
Randomization probability. Defaults to 1.
integrate.allocation
Either TRUE for including allocation in the product or FALSE does not include allocation.

Value

  • value of the integrand