LogLikeC.Score2: Calculate the gradient of the conditional likelihood for the...

Usage Arguments

View source: R/Functions5.R

Usage

1
2
LogLikeC.Score2(y, x, z, w.function, id, beta, sigma.vc, rho.vc, sigma.e,
  cutpoints, SampProb, Weights, CheeseCalc = FALSE)

Arguments

y

response vector

x

sum(n_i) by p design matrix for fixed effects

z

sum(n_i) by 2 design matric for random effects (intercept and slope)

w.function

sum(n_i) vector with possible values that include "mean" (mean of response series), "intercept" (intercept of the regression of Yi ~ zi where zi is the design matrix for the random effects (solve(t.zi

\item

idsum(n_i) vector of subject ids

\item

betamean model parameter p-vector

\item

sigma.vcvector of variance components on standard deviation scale

\item

rho.vcvector of correlations among the random effects. The length should be q choose 2

\item

sigma.estd dev of the measurement error distribution

\item

cutpointsA matrix with the first dimension equal to sum(n_i). These cutpoints define the sampling regions [bivariate Q_i: each row is a vector of length 4 c(xlow, xhigh, ylow, yhigh); univariate Q_i: each row is a vector of length 2 c(k1,k2) to define the sampling regions, i.e., low, middle, high]. Each subject should have n_i rows of the same values.

\item

SampProbA matrix with the first dimension equal to sum(n_i). Sampling probabilities from within each region [bivariate Q_i: each row is a vector of length 2 c(central region, outlying region); univariate Q_i: each row is a vector of length 3 with sampling probabilities for each region]. Each subject should have n_i rows of the same values.

\item

WeightsSubject specific sampling weights. A vector of length sum(n_i). Not used unless using weighted Likelihood

\item

CheeseCalcIf FALSE, the function returns the gradient of the conditional log likelihood across all subjects. If TRUE, the cheese part of the sandwich esitmator is calculated.

If CheeseCalc=FALSE, gradient of conditional log likelihood. If CheeseCalc=TRUE, the cheese part of the sandwich estimator is calculated. Calculate the gradient of the conditional likelihood for the univariate and bivariate sampling cases across all subjects (CheeseCalc=FALSE) or the cheese part of the sandwich estimator if CheeseCalc=TRUE.


schildjs/ods4lda documentation built on March 16, 2020, 8:16 a.m.