Man pages for baker
Nested Partially Latent Class Models

add_meas_BrS_case_Nest_Sliceadd likelihood for a BrS measurement slice among cases...
add_meas_BrS_case_Nest_Slice_jagsadd likelihood for a BrS measurement slice among cases...
add_meas_BrS_case_NoNest_reg_discrete_predictor_Slice_jagsadd likelihood component for a BrS measurement slice among...
add_meas_BrS_case_NoNest_reg_Slice_jagsadd likelihood component for a BrS measurement slice among...
add_meas_BrS_case_NoNest_Sliceadd a likelihood component for a BrS measurement slice among...
add_meas_BrS_case_NoNest_Slice_jagsadd a likelihood component for a BrS measurement slice among...
add_meas_BrS_ctrl_Nest_Sliceadd likelihood for a BrS measurement slice among controls...
add_meas_BrS_ctrl_NoNest_reg_discrete_predictor_Slice_jagsadd a likelihood component for a BrS measurement slice among...
add_meas_BrS_ctrl_NoNest_reg_Slice_jagsadd a likelihood component for a BrS measurement slice among...
add_meas_BrS_ctrl_NoNest_Sliceadd a likelihood component for a BrS measurement slice among...
add_meas_BrS_param_Nest_reg_Slice_jagsadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_Nest_Sliceadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_Nest_Slice_jagsadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_NoNest_reg_discrete_predictor_Slice_jagsadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_NoNest_reg_Slice_jagsadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_NoNest_Sliceadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_param_NoNest_Slice_jagsadd parameters for a BrS measurement slice among cases and...
add_meas_BrS_subclass_Nest_Sliceadd subclass indicators for a BrS measurement slice among...
add_meas_SS_caseadd likelihood for a SS measurement slice among cases...
add_meas_SS_paramadd parameters for a SS measurement slice among cases...
as.matrix_or_vecconvert one column data frame to a vector
assign_modelInterpret the specified model structure
bakerbaker: *B*ayesian *A*nalytic *K*it for *E*tiology *R*esearch
beta_parms_from_quantilesPick parameters in the Beta distribution to match the...
beta_plotPlot beta density
bin2decConvert a 0/1 binary-coded sequence into decimal digits
check_dir_createcheck existence and create folder if non-existent
clean_combine_subsitesCombine subsites in raw PERCH data set
clean_perch_dataClean PERCH data
combine_data_nplcmcombine multiple data_nplcm (useful when simulating data from...
compute_logOR_single_causeCalculate marginal log odds ratios
compute_marg_PR_nested_regcompute positive rates for nested model with subclass mixing...
compute_marg_PR_nested_reg_arraycompute positive rates for nested model with subclass mixing...
create_bugs_regressor_Eticreate regressor summation equation used in regression for...
create_bugs_regressor_FPRcreate regressor summation equation used in regression for...
data_nplcm_noregSimulated dataset that is structured in the format necessary...
data_nplcm_reg_nestSimulated dataset that is structured in the format necessary...
delete_start_withDeletes a pattern from the start of a string, or each of a...
dm_Rdate_EtiMake etiology design matrix for dates with R format.
dm_Rdate_FPRMake FPR design matrix for dates with R format.
expitexpit function
extract_data_rawImport Raw PERCH Data 'extract_data_raw' imports and converts...
get_coverageObtain coverage status from a result folder
get_direct_biasObtain direct bias that measure the discrepancy of a...
get_fitted_mean_nestedget fitted mean for nested model with subclass mixing weights...
get_fitted_mean_no_nestedget model fitted mean for conditional independence model
get_individual_dataget individual data
get_individual_predictionget individual prediction (Bayesian posterior)
get_latent_seqget index of latent status
get_marginal_rates_nestedget marginal TPR and FPR for nested model
get_marginal_rates_no_nestedget marginal TPR and FPR for no nested model
get_metricObtain Integrated Squared Aitchison Distance, Squared Bias...
get_pEti_sampget etiology samples by names (no regression)
get_plot_numget the plotting positions (numeric) for the fitted means; 3...
get_plot_posget a list of measurement index where to look for data
get_postsdObtain posterior standard deviation from a result folder
get_top_patternget top patterns from a slice of bronze-standard measurement
HShannon entropy for multivariate discrete data
has_non_basistest if a formula has terms not created by [s_date_Eti() or...
I2symbConvert 0/1 coding to pathogen/combinations
Imat2catConvert a matrix of binary indicators to categorical...
init_latent_jags_multipleSSInitialize individual latent status (for 'JAGS')
insert_bugfile_chunk_noreg_etiologyinsert distribution for latent status code chunk into .bug...
insert_bugfile_chunk_noreg_measInsert measurement likelihood (without regression) code...
insert_bugfile_chunk_reg_discrete_predictor_etiologyinsert etiology regression for latent status code chunk into...
insert_bugfile_chunk_reg_discrete_predictor_nonest_measInsert measurement likelihood (with regression; discrete)...
insert_bugfile_chunk_reg_etiologyinsert etiology regression for latent status code chunk into...
insert_bugfile_chunk_reg_nest_measInsert measurement likelihood (nested model+regression) code...
insert_bugfile_chunk_reg_nonest_measInsert measurement likelihood (with regression) code chunks...
is_discreteCheck if covariates are discrete
is.errorTest for 'try-error' class
is_intercept_onlycheck if the formula is intercept only
is_jags_folderSee if a result folder is obtained by JAGS
is_length_all_onecheck if a list has elements all of length one
jags2_bakerRun 'JAGS' from R
line2userconvert line to user coordinates
loadOneNameload an object from .RDATA file
logitlogit function
logORcalculate pairwise log odds ratios
logsumexplog sum exp trick
lookup_qualityGet position to store in data_nplcm$Mobs:
make_filenameCreate new file name
make_foldernameCreate new folder name
make_listTakes any number of R objects as arguments and returns a list...
make_meas_objectMake measurement slice
make_numbered_listMake a list with numbered names
make_templatemake a mapping template for model fitting
marg_HShannon entropy for binary data
match_causeMatch latent causes that might have the same combo but...
merge_listsFor a list of many sublists each of which has matrices as its...
my_reorderReorder the measurement dimensions to match the order for...
NA2dotconvert 'NA' to '.'
nplcmFit nested partially-latent class models (highest-level...
nplcm_fit_NoRegFit nested partially-latent class model (low-level)
nplcm_fit_Reg_discrete_predictor_NoNestFit nested partially-latent class model with regression...
nplcm_fit_Reg_NestFit nested partially-latent class model with regression...
nplcm_fit_Reg_NoNestFit nested partially-latent class model with regression...
nplcm_read_folderRead data and other model information from a folder that...
null_as_zeroConvert 'NULL' to zero.
order_post_etiorder latent status by posterior mean
overall_uniformspecify overall uniform (symmetric Dirichlet distribution)...
parse_nplcm_regparse regression components (either false positive rate or...
pathogen_category_perchpathogens and their categories in PERCH study (virus or...
pathogen_category_simulationHypothetical pathogens and their categories (virus or...
plot_BrS_panelPlot bronze-standard (BrS) panel
plot_case_studyvisualize the PERCH etiology regression with a continuous...
plot_check_common_patternPosterior predictive checking for the nested partially class...
plot_check_pairwise_SLORDPosterior predictive checking for nested partially latent...
plot_etiology_regressionvisualize the etiology regression with a continuous covariate
plot_etiology_stratvisualize the etiology estimates for each discrete levels
plot_leftmostplotting the labels on the left margin for panels plot
plot_logORmatVisualize pairwise log odds ratios (LOR) for data that are...
plot.nplcm'plot.nplcm' plot the results from 'nplcm()'.
plot_panelsPlot three-panel figures for nested partially-latent model...
plot_pie_panelPlot etiology (pie) panel
plot_SS_panelPlot silver-standard (SS) panel
plot_subwt_regressionvisualize the subclass weight regression with a continuous...
print.nplcm'print.nplcm' summarizes the results from 'nplcm()'.
print.summary.nplcm.no_regCompact printing of 'nplcm()' model fits
print.summary.nplcm.reg_nestCompact printing of 'nplcm()' model fits
print.summary.nplcm.reg_nest_stratCompact printing of 'nplcm()' model fits
print.summary.nplcm.reg_nonestCompact printing of 'nplcm()' model fits
print.summary.nplcm.reg_nonest_stratCompact printing of 'nplcm()' model fits
read_meas_objectRead measurement slices
rvbernSample a vector of Bernoulli variables.
s_date_EtiMake Etiology design matrix for dates with R format.
s_date_FPRMake false positive rate (FPR) design matrix for dates with R...
set_prior_tpr_BrS_NoNestSet true positive rate (TPR) prior ranges for bronze-standard...
set_prior_tpr_SSSet true positive rate (TPR) prior ranges for silver-standard...
set_stratStratification setup by covariates
show_depShow function dependencies
show_individualget an individual's data from the output of...
simulate_brsSimulate Bronze-Standard (BrS) Data
simulate_latentSimulate Latent Status:
simulate_nplcmSimulate data from nested partially-latent class model...
simulate_ssSimulate Silver-Standard (SS) Data
softmaxsoftmax
subset_data_nplcm_by_indexsubset data from the output of 'clean_perch_data()'
summarize_BrSsummarize bronze-standard data
summarize_SSsilver-standard data summary
summary.nplcm'summary.nplcm' summarizes the results from 'nplcm()'.
symb2IConvert names of pathogen/combinations into 0/1 coding
sym_diff_monthget symmetric difference of months from two vector of...
tsbgenerate stick-breaking prior (truncated) from a vector of...
unfactorConvert factor to numeric without losing information on the...
unique_causeget unique causes, regardless of the actual order in combo
unique_monthGet unique month from Date
visualize_case_control_matrixVisualize matrix for a quantity measured on cases and...
visualize_seasonvisualize trend of pathogen observation rate for NPPCR data...
write.modelfunction to write bugs model (copied from R2WinBUGS)
write_model_NoRegWrite .bug model file for model without regression
write_model_Reg_discrete_predictor_NoNestWrite .bug model file for regression model without nested...
write_model_Reg_NestWrite '.bug' model file for regression model WITH nested...
write_model_Reg_NoNestWrite .bug model file for regression model without nested...
baker documentation built on Feb. 2, 2022, 9:06 a.m.