simSurvey: Generate a set of survey participants

Description Usage Arguments Value Examples

View source: R/estVE.R

Description

Generate a set of survey participants

Usage

1
2
3
4
5
6
7
8
9
simSurvey(
  ofile = NA,
  yr = 5,
  nsub = 5000,
  pdisL2 = 0.03,
  pmv2 = 0.17,
  pmv1 = 2/3 * pmv2,
  seed = NA
)

Arguments

ofile

A string. The file name for the file containing the key parameters.

yr

A single value. The number of years of the comparison trial group (either 4 or 5)

nsub

A single value. The number of in the survey.

pdisL2

A single value. The risk of having a recently acquired HPV 16 or 18 persistent infection at the last two visits (usually this the value pdisL2.trial/(1-VE) where pdisL2.trial is the value input the trial generation)

pmv2

A single value. The probability of missing visit 2 or a failed sample at visit 2.

pmv1

A single value. The probability of a failed sample at visit 1.

Value

dMat: A matrix (nrow=number.of.subjects, ncol=number.of.visits). Entries are infection HPV16/18 status (w/ -9 for missing)

dMat16: A matrix (nrow=number.of.subjects, ncol=number.of.visits). Entries are HPV 16 infection status (w/ -9 for missing)

dMat18: A matrix (nrow=number.of.subjects, ncol=number.of.visits). Entries are HPV 18 infection status (w/ -9 for missing)

sMat: A matrix (nrow=number.of.subjects, ncol=number.of.visits). Entries are of sexual activity status (no missing).

Examples

1
survRes <- simSurvey(ofile="/volumes/data/Projects/HPV/out/Rparams.Rdat",yr=5,nsub=5000,pdisL2=0.03,pmv2=0.17,seed=NA)

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