LogLikeCAndScore: Calculate the ascertainment corrected log likelihood and...

Description Usage Arguments Value

View source: R/Functions2.R

Description

Calculate the ascertainment corrected log likelihood and score

Usage

1
2
LogLikeCAndScore(params, y, x, z, id, w.function, cutpoints, SampProb,
  SampProbi, ProfileCol = NA, Keep.liC = FALSE)

Arguments

params

parameter vector c(beta, log(sigma0), log(sigma1), rho, sigmae)

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)

id

sum(n_i) vector of subject ids

w.function

options include "mean" "intercept" "slope" and "bivar"

cutpoints

cutpoints defining the sampling regions [bivariate Q_i: a vector of length 4 c(xlow, xhigh, ylow, yhigh); univariate Q_i: a vector of length K c(k1,k2, ... K) to define the cutpoints for Q_i based sampling regions]

SampProb

Sampling probabilities from within each region [bivariate Q_i: a vector of length 2 c(central region, outlying region); univariate Q_i: a vector of length K+1 with sampling probabilities for each region]

SampProbi

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

ProfileCol

the column number(s) for which we want fixed at the value of param. Maimizing the log likelihood for all other parameters while fixing these columns at the values of params[ProfileCol]

Keep.liC

If TRUE outputs subject specific conditional log lileihoods to be used for the imputation procedure described in the AOAS paper keep z sum(n_i) by 2 design matric for random effects (intercept and slope)

Value

The conditional log likelihood with a "gradient" attribute (if Keep.liC=FALSE) and subject specific contributions to the conditional likelihood if Keep.liC=TRUE).


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