From c103d5b1ac8c4097005cb7a96e97f2c126997d24 Mon Sep 17 00:00:00 2001 From: Brandon Bertelsen Date: Thu, 15 Feb 2024 09:40:21 -0500 Subject: [PATCH] Adjustments for CRAN notes --- DESCRIPTION | 2 +- R/RcppExports.R | 4 ---- R/predict_race.R | 12 ++++++------ cran-comments.md | 1 + man/predict_race.Rd | 12 ++++++------ man/sample_me.Rd | 8 -------- src/sample_me.cpp | 4 ---- 7 files changed, 14 insertions(+), 29 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2cebb8d..a197065 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Authors@R: c( person("Brandon", "Bertelsen", , "brandon@bertelsen.ca", role = c("aut", "cre")), person("Santiago", "Olivella", , "olivella@unc.edu", role = "aut"), person("Evan", "Rosenman", , "etrrosenman@gmail.com", role = "aut"), - person("Alex", "Rossell Hayes", "alexander@rossellhayes.com", role = "aut"), + person("Alex", "Rossell Hayes", , "alexander@rossellhayes.com", role = "aut"), person("Kosuke", "Imai", , "imai@harvard.edu", role = "aut") ) Description: Predicts individual race/ethnicity using surname, first name, diff --git a/R/RcppExports.R b/R/RcppExports.R index b5c2b45..f7a8a81 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -8,9 +8,6 @@ #' @param middle_name See last_name #' @param geo Integer vector of geographic units for each record. Must match column number in N_rg #' @param N_rg Integer matrix of race | geography counts in census (geograpgies in columns). -#' @param M_rs Integer matrix of race | surname counts in dictionary (surnames in columns). -#' @param M_rf Same as `M_rs`, but for first names (can be empty matrix for surname only models). -#' @param M_rm Same as `M_rs`, but for middle names (can be empty matrix for surname, or surname and first name only models). #' @param alpha Numeric matrix of race | geography prior probabilities. #' @param pi_s Numeric matrix of race | surname prior probabilities. #' @param pi_f Same as `pi_s`, but for first names. @@ -19,7 +16,6 @@ #' @param which_names Integer; 0=surname only. 1=surname + first name. 2= surname, first, and middle names. #' @param samples Integer number of samples to take after (in total) #' @param burnin Integer number of samples to discard as burn-in of Markov chain -#' @param me_race Boolean; should measurement error in race | geography be corrected? #' @param race_init Integer vector of initial race assignments #' @param verbose Boolean; should informative messages be printed? #' diff --git a/R/predict_race.R b/R/predict_race.R index fe428c9..1f31b7c 100644 --- a/R/predict_race.R +++ b/R/predict_race.R @@ -93,12 +93,12 @@ #' Must be an integer vector, with 1=white, 2=black, 3=hispanic, 4=asian, and #' 5=other. Defaults to values obtained using \code{model="BISG_surname"}. #' @param control List of control arguments only used when \code{model="fBISG"}, including -#' \itemize{ -#' \item{iter}{ Number of MCMC iterations. Defaults to 1000.} -#' \item{burnin}{ Number of iterations discarded as burnin. Defaults to half of \code{iter}.} -#' \item{verbose}{ Print progress information. Defaults to \code{TRUE}.} -#' \item{me.correct}{ Boolean. Should the model correcting measurement error for \code{races|geo}? Defaults to \code{TRUE}.} -#' \item{seed}{ RNG seed. If \code{NULL}, a seed is generated and returned as an attribute for reproducibility.} +#' \describe{ +#' \item{iter}{Number of MCMC iterations. Defaults to 1000.} +#' \item{burnin}{Number of iterations discarded as burnin. Defaults to half of \code{iter}.} +#' \item{verbose}{Print progress information. Defaults to \code{TRUE}.} +#' \item{me.correct}{Boolean. Should the model correct measurement error for \code{races|geo}? Defaults to \code{TRUE}.} +#' \item{seed}{RNG seed. If \code{NULL}, a seed is generated and returned as an attribute for reproducibility.} #' } #' #' @return Output will be an object of class \code{data.frame}. It will diff --git a/cran-comments.md b/cran-comments.md index 858617d..25d6f18 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -3,3 +3,4 @@ 0 errors | 0 warnings | 1 note * This is a new release. +* Note is related to file size which cannot be reduced. diff --git a/man/predict_race.Rd b/man/predict_race.Rd index 35e2a86..f3bbcd7 100644 --- a/man/predict_race.Rd +++ b/man/predict_race.Rd @@ -131,12 +131,12 @@ follow the same structure as \code{last_c}, \code{first_c}, middle'. Defaults to 'surname'.} \item{control}{List of control arguments only used when \code{model="fBISG"}, including -\itemize{ -\item{iter}{ Number of MCMC iterations. Defaults to 1000.} -\item{burnin}{ Number of iterations discarded as burnin. Defaults to half of \code{iter}.} -\item{verbose}{ Print progress information. Defaults to \code{TRUE}.} -\item{me.correct}{ Boolean. Should the model correcting measurement error for \code{races|geo}? Defaults to \code{TRUE}.} -\item{seed}{ RNG seed. If \code{NULL}, a seed is generated and returned as an attribute for reproducibility.} +\describe{ +\item{iter}{Number of MCMC iterations. Defaults to 1000.} +\item{burnin}{Number of iterations discarded as burnin. Defaults to half of \code{iter}.} +\item{verbose}{Print progress information. Defaults to \code{TRUE}.} +\item{me.correct}{Boolean. Should the model correct measurement error for \code{races|geo}? Defaults to \code{TRUE}.} +\item{seed}{RNG seed. If \code{NULL}, a seed is generated and returned as an attribute for reproducibility.} }} } \value{ diff --git a/man/sample_me.Rd b/man/sample_me.Rd index 157ae51..5c40279 100644 --- a/man/sample_me.Rd +++ b/man/sample_me.Rd @@ -50,15 +50,7 @@ sample_me( \item{middle_name}{See last_name} -\item{M_rs}{Integer matrix of race | surname counts in dictionary (surnames in columns).} - -\item{M_rf}{Same as \code{M_rs}, but for first names (can be empty matrix for surname only models).} - -\item{M_rm}{Same as \code{M_rs}, but for middle names (can be empty matrix for surname, or surname and first name only models).} - \item{alpha}{Numeric matrix of race | geography prior probabilities.} - -\item{me_race}{Boolean; should measurement error in race | geography be corrected?} } \description{ Collapsed Gibbs sampler for hWRU. Internal function diff --git a/src/sample_me.cpp b/src/sample_me.cpp index 8eae6a3..6d744d8 100644 --- a/src/sample_me.cpp +++ b/src/sample_me.cpp @@ -7,9 +7,6 @@ //' @param middle_name See last_name //' @param geo Integer vector of geographic units for each record. Must match column number in N_rg //' @param N_rg Integer matrix of race | geography counts in census (geograpgies in columns). -//' @param M_rs Integer matrix of race | surname counts in dictionary (surnames in columns). -//' @param M_rf Same as `M_rs`, but for first names (can be empty matrix for surname only models). -//' @param M_rm Same as `M_rs`, but for middle names (can be empty matrix for surname, or surname and first name only models). //' @param alpha Numeric matrix of race | geography prior probabilities. //' @param pi_s Numeric matrix of race | surname prior probabilities. //' @param pi_f Same as `pi_s`, but for first names. @@ -18,7 +15,6 @@ //' @param which_names Integer; 0=surname only. 1=surname + first name. 2= surname, first, and middle names. //' @param samples Integer number of samples to take after (in total) //' @param burnin Integer number of samples to discard as burn-in of Markov chain -//' @param me_race Boolean; should measurement error in race | geography be corrected? //' @param race_init Integer vector of initial race assignments //' @param verbose Boolean; should informative messages be printed? //'