CalcNpmleCalibP: Calculating the probabilities of positive binary exposure...

Description Usage Arguments Value Examples

View source: R/CalcNpmleCalibP.R

Description

For a given time point, calculate the probability of positive exposure value for multiple observations (participants). The function uses the results of a nonparametric calibration model fit, and given collected data on the history of the binary exposure for each participant.

Usage

1
CalcNpmleCalibP(w, w.res, point, fit.npmle)

Arguments

w

A matrix of time points when measurements on the binary covariate were obtained.

w.res

A matrix of measurement results of the binary covariate. Each measurement corresponds to the time points in w

point

The time point at which the probabilities are estimated.

fit.npmle

The result of icenReg::ic_np on the interval-censored data

Value

A vector of estimated probabilities of positive exposure status at time point.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sim.data <- ICcalib:::SimCoxIntervalCensSingle(n.sample = 200, lambda = 0.1, 
                                               alpha = 0.25, beta0 = log(0.5), 
                                               mu = 0.2, n.points = 2, 
                                               weib.shape = 1, weib.scale = 2)
# Fit nonparametric calibration model
fit.npmle <- FitCalibNpmle(w = sim.data$w, w.res = sim.data$w.res)
# Calculate the conditional probabilities of binary covariate=1 at time one
probs <- CalcNpmleCalibP(w = sim.data$w, w.res = sim.data$w.res, 
                         point = 1, fit.npmle = fit.npmle)
summary(probs)

ICcalib documentation built on Jan. 20, 2018, 9:52 a.m.