nplcm: Fit nested partially latent class models (high-level)

Description Usage Arguments Details Value

View source: R/nplcm.R

Description

Uses WinBUGS in Windows system for Bayesian inference (see README file for an instruction to install WinBUGS on windows 7 or 8.). For stratification/regression functionalities, true positive rates are constant across stratum or covariate values.

Usage

1
nplcm(data_nplcm, model_options, mcmc_options)

Arguments

data_nplcm
  • Mobs A list of measurements. The elements of the list should include MBS, MSS, and MGS. If any of the component is not available, please specify it as, e.g., MGS=NA or MGS=NULL (effectively deleting MGS from Mobs).

    • MBS a data frame of bronze-standard (BrS) measurements. Rows are subjects, columns are pathogens. They have imperfect sensitivity/specificity (e.g. nasalpharyngeal PCR).

    • MSS a data frame of silver-standard (SS) measurements. Rows are subjects, columns are pathogens measured in specimen (e.g. blood culture). These measurements have perfect specificity but imperfect sensitivity.

    • MGS a data frame of gold-standard (GS) measurements. Rows are subject, columns are pathogen measurements. These measurements have perfect sensitivity and specificity.

  • Y Vector of disease status: 1 for case, 0 for control.

  • X Covariate matrix for regression modeling. It contains raw covariate data, not design matrix for regression models.

model_options

A list of model options.

  • M_use List of measurements to be used in the model;

  • k_subclassThe number of nested subclasses. 1 for conditional independence, >1 for conditional dependence;

  • TPR_prior Description of priors for the measurements (e.g., informative vs non-informative). Its length should be the same with M_use;

  • Eti_prior Description of etiology prior (e.g., overall_uniform - all hyperparameters are 1; or 0_1 - all hyperparameters are 0.1);

  • pathogen_BrS_list The vector of pathogen names with BrS measure;

  • cause_list The vector of causes that are either singleton or combinations of items in pathogen_BrS_list; 'NoA' can also be included at the end, meaning 'None-of-Above';

  • X_reg_FPR formula for false positive rates (FPR) regressions; see formula. You can use dm_Rdate_FPR to specify part of the design matrix for R format enrollment date; it will produce thin-plate regression spline basis for every date (if effect="random" and num_knots_FPR is specified to a positive integer, e.g., 10.). If effect="fixed", dm_Rdate_FPR will just specify a design matrix with appropirately standardized dates. Specify ~0 if no regression is intended.

  • X_reg_Eti formula for etiology regressions. You can use dm_Rdate_Eti to specify the design matrix for R format enrollment date; it will produce natural cubic splines for every date. Specify ~0 if no regression is intended.

  • pathogen_BrS_cat The two-column data frame that has category of pathogens: virus (V), bacteria (B) and fungi (F);

  • pathogen_SSonly_list The vector of pathogens with only SS measure;

  • pathogen_SSonly_cat The category of pathogens with only SS measure.

mcmc_options

A list of Markov chain Monte Carlo (MCMC) options.

  • debugstatus Logical - whether to pause WinBUGS after it finishes model fitting;

  • n.chains Number of MCMC chains;

  • n.burnin Number of burn-in samples;

  • n.thin To keep every other n.thin samples after burn-in period;

  • individual.pred whether to perform individual prediction;

  • ppd whether to perform posterior predictive (ppd) checking;

  • result.folder Path to folder storing the results;

  • bugsmodel.dir Path to WinBUGS model files;

  • winbugs.dir Path to where WinBUGS 1.4 is installed.

Details

Developer Note (DN):

Value

A WinBUGS result, fitted by function bugs() from the R2WinBUGS package. Current implemented models follow the hierarchy below:


zhenkewu/nplcm documentation built on May 4, 2019, 10:19 p.m.