plhood1: plhood1

Description Usage Arguments Details Value Author(s)

View source: R/fit.3g.R

Description

Computes the likelihood of observed Z_a.

Usage

1
plhood1(za, pars, weights = rep(1, length(za)), C = 1, sumlog = TRUE)

Arguments

za

one dimensional vector of Z_a scores

pars

vector of parameters (pi0,pi1,tau,sigma1,sigma2,rho)

weights

LDAK weights corresponding to Z_a

C

scaling factor for adjustment

sumlog

set to TRUE to return the (weighted) sum of log pseudo-likelihoods for each datapoint; FALSE to return a vector of pseudo-likelihoods for each datapoint.

Details

Used for establishing how much of a likelihood ratio is because Z_a is better-fitted by a three-Gaussian model than a two-Gaussian model. Strictly, calculates the expected value of PL(Z_d,Z_a) when Z_d has uniform unit variance, and the parameter values tau, rho are set to 1, 0 respectively.

Value

value of pseudo- log likelihood of all observations (if sumlog==TRUE) or vector of n pseudo-likelihoods (if sumlog==FALSE)

Author(s)

James Liley


jamesliley/subtest documentation built on May 18, 2019, 11:21 a.m.