LogLikeFun2: LogLikeFun2

Description Usage Arguments Value Examples

View source: R/FunsForOptimalV2.R

Description

caculate the log-likelihood value for Maximum Likelihood Estimates in LBC model

Usage

1
LogLikeFun2(bb, ixx, iyy, iw, iZZ)

Arguments

bb

initial values for the intercept and slope coefficients

ixx

continuous predictor

iyy

binary outcome

iw

the weighted parameter

iZZ

covariates to be incorporated in the model

Value

a single log-likelihood value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
iZZ <- matrix(0,100,10)
ixx <- matrix(0,100,1)
iyy <- matrix(0,100,1)
iw <-matrix(0,100,1)
# ixx: continuous predictor
# iyy: binary outcome
# iZZ: covariates to be incorporated in the model
# iw:  The weighted parameter
# myLBC <-
#   maxLik(
#     logLik = LogLikeFun2,
#     grad = ScoreFun,
#     start = inits,
#    ixx = ixx,
#     iyy = iyy,
#    iw = iw,
#   iZZ = as.matrix(iZZ)
#  )
# as.matrix returns all values of iZZ as a matrix

LBC documentation built on Nov. 15, 2021, 9:07 a.m.