From 83ef75d2850d29f4e9d8421c4fae2630d355882a Mon Sep 17 00:00:00 2001 From: Jeffrey Pullin Date: Wed, 27 May 2020 19:56:11 +1000 Subject: [PATCH] Document --- NAMESPACE | 11 ---------- man/check_K.Rd | 19 ---------------- man/class_conditional_dawid_skene_inits.Rd | 19 ---------------- man/creat_inits.Rd | 19 ---------------- man/data_types.Rd | 25 ---------------------- man/dawid_skene_inits.Rd | 19 ---------------- man/get_stan_file.Rd | 19 ---------------- man/new_grouped_data.Rd | 14 ------------ man/new_long_data.Rd | 14 ------------ man/new_mcmc_fit.Rd | 21 ------------------ man/new_optim_fit.Rd | 21 ------------------ man/new_wide_data.Rd | 14 ------------ man/parse_priors.Rd | 19 ---------------- man/rater.Rd | 14 +++++++++--- man/validate_input.Rd | 16 -------------- 15 files changed, 11 insertions(+), 253 deletions(-) delete mode 100644 man/check_K.Rd delete mode 100644 man/class_conditional_dawid_skene_inits.Rd delete mode 100644 man/creat_inits.Rd delete mode 100644 man/data_types.Rd delete mode 100644 man/dawid_skene_inits.Rd delete mode 100644 man/get_stan_file.Rd delete mode 100644 man/new_grouped_data.Rd delete mode 100644 man/new_long_data.Rd delete mode 100644 man/new_mcmc_fit.Rd delete mode 100644 man/new_optim_fit.Rd delete mode 100644 man/new_wide_data.Rd delete mode 100644 man/parse_priors.Rd delete mode 100644 man/validate_input.Rd diff --git a/NAMESPACE b/NAMESPACE index e22ad5b..e79f86f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,9 +1,5 @@ # Generated by roxygen2: do not edit by hand -S3method("[",rater_data) -S3method("[[",rater_data) -S3method(as.matrix,rater_data) -S3method(dim,rater_data) S3method(pi_point_estimate,mcmc_fit) S3method(pi_point_estimate,optim_fit) S3method(plot,rater_fit) @@ -11,15 +7,11 @@ S3method(plot_z,matrix) S3method(plot_z,rater_fit) S3method(posterior_interval,mcmc_fit) S3method(posterior_interval,optim_fit) -S3method(print,grouped_data) -S3method(print,long_data) S3method(print,mcmc_fit) S3method(print,optim_fit) S3method(print,rater_model) -S3method(print,wide_data) S3method(summary,mcmc_fit) S3method(summary,optim_fit) -S3method(summary,rater_data) S3method(summary,rater_model) S3method(theta_point_estimate,mcmc_fit) S3method(theta_point_estimate,optim_fit) @@ -33,9 +25,7 @@ export(extract_prevalence) export(extract_raters) export(extract_theta) export(extract_z) -export(grouped_data) export(hier_dawid_skene) -export(long_data) export(pi_point_estimate) export(plot_pi) export(plot_theta) @@ -44,7 +34,6 @@ export(point_estimate) export(posterior_samples) export(rater) export(theta_point_estimate) -export(wide_data) export(z_point_estimate) import(Rcpp) import(methods) diff --git a/man/check_K.Rd b/man/check_K.Rd deleted file mode 100644 index 5e36c6c..0000000 --- a/man/check_K.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{check_K} -\alias{check_K} -\title{Helper to check if the prior parameters and data have consistent dimensions} -\usage{ -check_K(stan_data, model) -} -\arguments{ -\item{stan_data}{data in stan format} - -\item{model}{the passed model} -} -\value{ -the fully reliased prior parameters -} -\description{ -Helper to check if the prior parameters and data have consistent dimensions -} diff --git a/man/class_conditional_dawid_skene_inits.Rd b/man/class_conditional_dawid_skene_inits.Rd deleted file mode 100644 index c6406e6..0000000 --- a/man/class_conditional_dawid_skene_inits.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{class_conditional_dawid_skene_inits} -\alias{class_conditional_dawid_skene_inits} -\title{Creates inits for the class conditional dawid and skene model} -\usage{ -class_conditional_dawid_skene_inits(K, J) -} -\arguments{ -\item{K}{number of categories} - -\item{J}{number of raters} -} -\value{ -inits in the format required by stan -} -\description{ -Creates inits for the class conditional dawid and skene model -} diff --git a/man/creat_inits.Rd b/man/creat_inits.Rd deleted file mode 100644 index 5e13bdd..0000000 --- a/man/creat_inits.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{creat_inits} -\alias{creat_inits} -\title{Creates inits for the stan MCMC chains} -\usage{ -creat_inits(model, stan_data) -} -\arguments{ -\item{model}{rater model} - -\item{stan_data}{data in list form} -} -\value{ -intits in the format required by stan -} -\description{ -Creates inits for the stan MCMC chains -} diff --git a/man/data_types.Rd b/man/data_types.Rd deleted file mode 100644 index afbe7d1..0000000 --- a/man/data_types.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data_types.R -\name{data_types} -\alias{data_types} -\alias{wide_data} -\alias{long_data} -\alias{grouped_data} -\title{Data types compatible with the models of categorical annotation} -\usage{ -wide_data(data) - -long_data(data) - -grouped_data(data) -} -\arguments{ -\item{data}{a numeric matrix} -} -\value{ -a \code{rater_data} object that can be passed to \code{\link{rater}}. -} -\description{ -Functions to coerce/parse various types of input data - for use in \code{\link{rater}()}. -} diff --git a/man/dawid_skene_inits.Rd b/man/dawid_skene_inits.Rd deleted file mode 100644 index 3bdaf1c..0000000 --- a/man/dawid_skene_inits.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{dawid_skene_inits} -\alias{dawid_skene_inits} -\title{Creates inits for the dawid and skene model} -\usage{ -dawid_skene_inits(K, J) -} -\arguments{ -\item{K}{number of categories} - -\item{J}{number of raters} -} -\value{ -inits in the format required by stan -} -\description{ -Creates inits for the dawid and skene model -} diff --git a/man/get_stan_file.Rd b/man/get_stan_file.Rd deleted file mode 100644 index 2d2fe26..0000000 --- a/man/get_stan_file.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{get_stan_file} -\alias{get_stan_file} -\title{Helper get the correct stan file to run for model/data combination} -\usage{ -get_stan_file(data, model) -} -\arguments{ -\item{data}{a rater_data object} - -\item{model}{a rater_model object} -} -\value{ -the name (no .stan) of the stan file that should be run -} -\description{ -Helper get the correct stan file to run for model/data combination -} diff --git a/man/new_grouped_data.Rd b/man/new_grouped_data.Rd deleted file mode 100644 index 97a35d8..0000000 --- a/man/new_grouped_data.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data_types.R -\name{new_grouped_data} -\alias{new_grouped_data} -\title{Internal helper to creat a grouped_data object} -\usage{ -new_grouped_data(data) -} -\arguments{ -\item{data}{a numeric matrix} -} -\description{ -Internal helper to creat a grouped_data object -} diff --git a/man/new_long_data.Rd b/man/new_long_data.Rd deleted file mode 100644 index 087da8f..0000000 --- a/man/new_long_data.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data_types.R -\name{new_long_data} -\alias{new_long_data} -\title{Internal helper to creat a wide_data object} -\usage{ -new_long_data(data) -} -\arguments{ -\item{data}{a numeric matrix with three columns} -} -\description{ -Internal helper to creat a wide_data object -} diff --git a/man/new_mcmc_fit.Rd b/man/new_mcmc_fit.Rd deleted file mode 100644 index c3f4f05..0000000 --- a/man/new_mcmc_fit.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/rater_fit_class.R -\name{new_mcmc_fit} -\alias{new_mcmc_fit} -\title{Make a mcmc_rater fit object} -\usage{ -new_mcmc_fit(model, draws, data) -} -\arguments{ -\item{model}{a rater model} - -\item{draws}{a stanfit object} - -\item{data}{the data used to fit the model} -} -\value{ -a rater fit object -} -\description{ -Make a mcmc_rater fit object -} diff --git a/man/new_optim_fit.Rd b/man/new_optim_fit.Rd deleted file mode 100644 index fcecb3c..0000000 --- a/man/new_optim_fit.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/rater_fit_class.R -\name{new_optim_fit} -\alias{new_optim_fit} -\title{Make a optim_rater fit object} -\usage{ -new_optim_fit(model, estimates, data) -} -\arguments{ -\item{model}{a rater model} - -\item{estimates}{a stan optimisation object} - -\item{data}{the data used to fit the model} -} -\value{ -a rater fit object -} -\description{ -Make a optim_rater fit object -} diff --git a/man/new_wide_data.Rd b/man/new_wide_data.Rd deleted file mode 100644 index 94ee3ee..0000000 --- a/man/new_wide_data.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data_types.R -\name{new_wide_data} -\alias{new_wide_data} -\title{Internal helper to creat a wide_data object} -\usage{ -new_wide_data(data) -} -\arguments{ -\item{data}{a numeric matrix} -} -\description{ -Internal helper to creat a wide_data object -} diff --git a/man/parse_priors.Rd b/man/parse_priors.Rd deleted file mode 100644 index ea73741..0000000 --- a/man/parse_priors.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{parse_priors} -\alias{parse_priors} -\title{Converts default prior parameter specification to full priors} -\usage{ -parse_priors(model, K) -} -\arguments{ -\item{model}{the rater_model} - -\item{K}{the number of categories} -} -\value{ -the fully reliased prior parameters -} -\description{ -Converts default prior parameter specification to full priors -} diff --git a/man/rater.Rd b/man/rater.Rd index b54729e..958ee81 100644 --- a/man/rater.Rd +++ b/man/rater.Rd @@ -4,16 +4,17 @@ \alias{rater} \title{Fit noisy catergrical rating models using Stan} \usage{ -rater(data, model, method = "mcmc", inits = NULL, ...) +rater(data, model, method = "mcmc", data_format = "long", inits = NULL, ...) } \arguments{ -\item{data}{Data for the model in long format as a three column dataframe of -ii, jj, yy} +\item{data}{TODO} \item{model}{Model to fit to data of class model} \item{method}{method the method used to fit the model} +\item{data_format}{TODO} + \item{inits}{the initialization points of the fitting algorithm} \item{...}{extra parameters to be passed to the Stan fitting interface} @@ -24,3 +25,10 @@ An object of type fit containing the fitted parameters \description{ Fit noisy catergrical rating models using Stan } +\details{ +TODO +} +\examples{ +"TODO" + +} diff --git a/man/validate_input.Rd b/man/validate_input.Rd deleted file mode 100644 index 56dce88..0000000 --- a/man/validate_input.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/inference.R -\name{validate_input} -\alias{validate_input} -\title{Helper to check if passed data and model are valid and consistent} -\usage{ -validate_input(data, model) -} -\arguments{ -\item{data}{rater_data} - -\item{model}{rater_model} -} -\description{ -Helper to check if passed data and model are valid and consistent -}