eventCount: Obtain the observed and expected number of events in one arm...

Description Usage Arguments Value Examples

View source: R/estVE.R

Description

Obtain the observed and expected number of events in one arm of the trial

Usage

1
eventCount(dMat16x, dMat18x, sMatx, ATPx)

Arguments

dMat16x

A matrix (nrow=number.of.subjects, ncol=number.of.visits.including.baseline). Entries are 0 or 1, indicating HPV 16 infection status (w/ -9 for missing)

dMat18x

A matrix (nrow=number.of.subjects, ncol=number.of.visits.including.baseline). Entries are 0 or 1, indicating HPV 18 infection status (w/ -9 for missing)

sMatx:

A matrix (nrow=number.of.subjects, ncol=number.of.visits.including.baseline). Entries are 0 or 1, indicating if a woman has had her sexual debut (w/ -9 for missing)

ATPx:

A vector of length number.of.subjects. Entries are 0 or 1, indicating whether the subject was part of the ATP group.

Value

N: A single value. The number of women in the ATP cohort.

nobs: A single value. The number of ATP women OBSERVED to have an event (i.e. no 0/6 month infection and a incident persistent infection)

nexp: A single value. The number of ATP women EXPECTED to have an event (i.e. no 0/6 month infection and a incident persistent infection)

infFact: A single value. The inflation factor = nexp/nobs

Nequiv: A single value. The equivalent sample size = N/infFact

Examples

1
2
3
4
5
6
trialRes <- simTrialArm(ofile="/volumes/data/Projects/HPV/out/Rparams.Rdat",yr=5,nsub=5000,pdis=0.01,pdo6=0.05,pdo=0.02,pmv=0.17)
dMat16x   <- trialRes$dMat16
dMat18x   <- trialRes$dMat18
sMatx     <- trialRes$sMat
ATPx      <- trialRes$ATPx
ecount    <- eventCount(dMat16x,dMat18x,sMatx,ATPx)

sampsonj74/ESCUDDO documentation built on Jan. 1, 2021, 2:55 p.m.