Skip to content

Commit

Permalink
typos correction
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszChrostowski committed Jan 20, 2025
1 parent f3ae5c1 commit faebafd
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 71 deletions.
34 changes: 17 additions & 17 deletions R/control_inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
#' @description \code{control_inf} constructs a list with all necessary control parameters
#' for statistical inference.
#'
#' @param vars_selection If `TRUE`, then variables selection model is used.
#' @param var_method variance method.
#' @param rep_type replication type for weights in the bootstrap method for variance estimation passed to [survey::as.svrepdesign()].
#' @param vars_selection If `TRUE`, then the variables selection model is used.
#' @param var_method the variance method.
#' @param rep_type the replication type for weights in the bootstrap method for variance estimation passed to [survey::as.svrepdesign()].
#' Default is `subbootstrap`.
#' @param bias_inf inference method in the bias minimization.
#' @param bias_inf the inference method in the bias minimization.
#' \itemize{
#' \item if \code{union} then final model is fitting on union of selected variables for selection and outcome models
#' \item if \code{div} then final model is fitting separately on division of selected variables into relevant ones for
#' \item if \code{union}, then the final model is fitted on the union of selected variables for selection and outcome models
#' \item if \code{div}, then the final model is fitted separately on division of selected variables into relevant ones for
#' selection and outcome model.
#' }
#' @param bias_correction if `TRUE`, then bias minimization estimation used during fitting the model.
#' @param num_boot number of iteration for bootstrap algorithms.
#' @param alpha Significance level, Default is 0.05.
#' @param cores Number of cores in parallel computing.
#' @param keep_boot Logical indicating whether statistics from bootstrap should be kept.
#' @param bias_correction if `TRUE`, then the bias minimization estimation used during model fitting.
#' @param num_boot the number of iteration for bootstrap algorithms.
#' @param alpha significance level, 0.05 by defult.
#' @param cores the number of cores in parallel computing.
#' @param keep_boot a logical value indicating whether statistics from bootstrap should be kept.
#' By default set to \code{TRUE}
#' @param nn_exact_se Logical value indicating whether to compute the exact
#' @param nn_exact_se a logical value indicating whether to compute the exact
#' standard error estimate for \code{nn} or \code{pmm} estimator. The variance estimator for
#' estimation based on \code{nn} or \code{pmm} can be decomposed into three parts, with the
#' third being computed using covariance between imputed values for units in
#' probability sample using predictive matches from non-probability sample.
#' third computed using covariance between imputed values for units in
#' the probability sample using predictive matches from the non-probability sample.
#' In most situations this term is negligible and is very computationally
#' expensive so by default this is set to \code{FALSE}, but it is recommended to
#' set this value to \code{TRUE} before submitting final results.
#' @param pi_ij TODO, either matrix or \code{ppsmat} class object.
#' expensive so by default it is set to \code{FALSE}, but the recommended option is to
#' set this value to \code{TRUE} before submitting the final results.
#' @param pi_ij TODO, either a matrix or a \code{ppsmat} class object.
#'
#'
#' @return List with selected parameters.
Expand Down
34 changes: 17 additions & 17 deletions R/main_function_documentation.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' @import mathjaxr
NULL
#' @title Inference with the non-probability survey samples
#' @title Inference with non-probability survey samples
#' @author Łukasz Chrostowski, Maciej Beręsewicz
#'
#' \loadmathjax
#' @description \code{nonprob} fits model for inference based on non-probability surveys (including big data) using various methods.
#' @description \code{nonprob} fits a model for inference based on non-probability surveys (including big data) using various methods.
#' The function allows you to estimate the population mean with access to a reference probability sample, as well as sums and means of covariates.
#'
#' The package implements state-of-the-art approaches recently proposed in the literature: Chen et al. (2020),
Expand All @@ -13,32 +13,32 @@ NULL
#' It provides propensity score weighting (e.g. with calibration constraints), mass imputation (e.g. nearest neighbour) and
#' doubly robust estimators that take into account minimisation of the asymptotic bias of the population mean estimators or
#' variable selection.
#' The package uses `survey` package functionality when a probability sample is available.
#' The package uses the `survey` package functionality when a probability sample is available.
#'
#'
#' @param data `data.frame` with data from the non-probability sample.
#' @param selection `formula`, the selection (propensity) equation.
#' @param outcome `formula`, the outcome equation.
#' @param target `formula` with target variables.
#' @param svydesign an optional `svydesign` object (from the survey package) containing probability sample and design weights.
#' @param data a `data.frame` with data from the non-probability sample.
#' @param selection a `formula`, the selection (propensity) equation.
#' @param outcome a `formula`, the outcome equation.
#' @param target a `formula` with target variables.
#' @param svydesign an optional `svydesign` object (from the survey package) containing a probability sample and design weights.
#' @param pop_totals an optional `named vector` with population totals of the covariates.
#' @param pop_means an optional `named vector` with population means of the covariates.
#' @param pop_size an optional `double` with population size.
#' @param method_selection a `character` with method for propensity scores estimation.
#' @param method_outcome a `character` with method for response variable estimation.
#' @param family_outcome a `character` string describing the error distribution and link function to be used in the model. Default is "gaussian". Currently supports: gaussian with identity link, poisson and binomial.
#' @param pop_size an optional `double` value with population size.
#' @param method_selection a `character` indicating the method for propensity scores estimation.
#' @param method_outcome a `character` indicating the method for response variable estimation.
#' @param family_outcome a `character` string describing the error distribution and the link function to be used in the model, set to `gaussian` by default. Currently supports: gaussian with identity link, poisson and binomial.
#' @param subset an optional `vector` specifying a subset of observations to be used in the fitting process - not yet supported.
#' @param strata an optional `vector` specifying strata - not yet supported.
#' @param weights an optional `vector` of prior weights to be used in the fitting process. Should be NULL or a numeric vector. It is assumed that this vector contains frequency or analytic weights.
#' @param na_action a function which indicates what should happen when the data contain `NAs` - not yet supported.
#' @param control_selection a `list` indicating parameters to use in fitting selection model for propensity scores.
#' @param control_outcome a `list` indicating parameters to use in fitting model for outcome variable.
#' @param control_inference a `list` indicating parameters to use in inference based on probability and non-probability samples, contains parameters such as estimation method or variance method.
#' @param control_selection a `list` indicating parameters to be used when fitting the selection model for propensity scores.
#' @param control_outcome a `list` indicating parameters to be used when fitting the model for the outcome variable.
#' @param control_inference a `list` indicating parameters to be used for inference based on probability and non-probability samples, contains parameters such as the estimation method or the variance method.
#' @param start_selection an optional `vector` with starting values for the parameters of the selection equation.
#' @param start_outcome an optional `vector` with starting values for the parameters of the outcome equation.
#' @param verbose verbose, numeric.
#' @param x Logical value indicating whether to return model matrix of covariates as a part of output.
#' @param y Logical value indicating whether to return vector of outcome variable as a part of output.
#' @param x a logical value indicating whether to return model matrix of covariates as a part of the output.
#' @param y a logical value indicating whether to return vector of the outcome variable as a part of the output.
#' @param se Logical value indicating whether to calculate and return standard error of estimated mean.
#' @param ... Additional, optional arguments.
#'
Expand Down
34 changes: 17 additions & 17 deletions man/control_inf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/control_sel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/jvs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions man/nonprob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit faebafd

Please sign in to comment.