Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Authors@R:
Description: Methods to estimate finite-population parameters under nonresponse that is not missing at
random (NMAR, nonignorable). Incorporates auxiliary information and user-specified response models,
and supports independent samples and complex survey designs via objects from the 'survey' package.
Provides diagnostics and optional variance estimates.
Provides diagnostics and optional variance estimates. For methodological background see
Qin, Leung and Shao (2002) <doi:10.1198/016214502753479338> and Riddles, Kim and Im (2016) <doi:10.1093/jssam/smv047>.
License: MIT + file LICENSE
URL: https://github.com/ncn-foreigners/NMAR, https://ncn-foreigners.ue.poznan.pl/NMAR/index.html
BugReports: https://github.com/ncn-foreigners/NMAR/issues
Expand Down
1 change: 1 addition & 0 deletions src_dev/S3/nmar_engine_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ s3_engine_display_keys <- function(x) {
#'
#' @param x An engine object inheriting from `nmar_engine`.
#' @param ... Unused.
#' @return `x`, invisibly.
#' @keywords engine_view
#' @export
print.nmar_engine <- function(x, ...) {
Expand Down
5 changes: 5 additions & 0 deletions src_dev/S3/nmar_result_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ NULL
#' Variance-covariance for base NMAR results
#' @param object An object of class `nmar_result`.
#' @param ... Ignored.
#' @return A 1x1 numeric matrix (the variance of the primary estimate).
#' @keywords result_param
#' @export
vcov.nmar_result <- function(object, ...) {
Expand All @@ -50,6 +51,7 @@ vcov.nmar_result <- function(object, ...) {
#' @param parm Ignored.
#' @param level Confidence level.
#' @param ... Ignored.
#' @return A 1x2 numeric matrix with confidence limits.
#' @keywords result_param
#' @export
confint.nmar_result <- function(object, parm, level = 0.95, ...) {
Expand Down Expand Up @@ -80,6 +82,8 @@ confint.nmar_result <- function(object, parm, level = 0.95, ...) {
#' @param x An object of class `nmar_result`.
#' @param conf.level Confidence level for the primary estimate.
#' @param ... Ignored.
#' @return A data frame with one row for the primary estimate and, when
#' available, additional rows for the response-model coefficients.
#' @keywords result_view
#' @method tidy nmar_result
#' @export
Expand Down Expand Up @@ -148,6 +152,7 @@ tidy.nmar_result <- function(x, conf.level = 0.95, ...) {
#' @description One-row diagnostics for NMAR fits.
#' @param x An object of class `nmar_result`.
#' @param ... Ignored.
#' @return A one-row data frame with diagnostics and metadata.
#' @keywords result_view
#' @method glance nmar_result
#' @export
Expand Down
3 changes: 3 additions & 0 deletions src_dev/S3/nmar_result_print.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#'
#' @param x nmar_result object
#' @param ... Additional parameters
#' @return `x`, invisibly.
#' @keywords result_view
#' @export
print.nmar_result <- function(x, ...) {
Expand Down Expand Up @@ -56,6 +57,7 @@ print.nmar_result <- function(x, ...) {
#' @param object nmar_result object
#' @param conf.level Confidence level for intervals.
#' @param ... Additional parameters
#' @return An object of class `summary_nmar_result`.
#' @keywords result_view
#' @export

Expand Down Expand Up @@ -90,6 +92,7 @@ summary.nmar_result <- function(object, conf.level = 0.95, ...) {
#'
#' @param x summary_nmar_result object
#' @param ... Additional parameters
#' @return `x`, invisibly.
#' @keywords result_view
#' @export

Expand Down
8 changes: 8 additions & 0 deletions src_dev/engines/el/run_engine.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#' Run method for EL engine
#'
#' @param engine An object of class \code{nmar_engine_el}.
#' @param formula A two-sided formula passed through by \code{nmar()}.
#' @param data A \code{data.frame} or \code{survey.design}.
#' @param trace_level Integer 0-3 controlling verbosity.
#'
#' @return An object of class \code{nmar_result_el} (which also inherits from
#' \code{nmar_result}).
#' @keywords internal
#' @exportS3Method run_engine nmar_engine_el
run_engine.nmar_engine_el <- function(engine, formula, data, trace_level = 0) {
Expand Down
2 changes: 2 additions & 0 deletions src_dev/engines/el/s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NULL
#' @description Compact print for objects of class \code{nmar_result_el}.
#' @param x An object of class \code{nmar_result_el}.
#' @param ... Ignored.
#' @return \code{x}, invisibly.
#' @keywords result_view
#' @export
print.nmar_result_el <- function(x, ...) {
Expand Down Expand Up @@ -45,6 +46,7 @@ print.nmar_result_el <- function(x, ...) {
#' @description Summarize estimation, standard error and missingness-model coefficients.
#' @param object An object of class \code{nmar_result_el}.
#' @param ... Ignored.
#' @return An object of class \code{summary_nmar_result_el}.
#' @keywords result_view
#' @export
summary.nmar_result_el <- function(object, ...) {
Expand Down
2 changes: 2 additions & 0 deletions src_dev/engines/exptilt-nonparam/impl/exptilt_nonparam.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#'
#' @param data A data.frame or survey.design object
#' @param ... Other arguments passed to methods
#' @return An engine-specific NMAR result object for the nonparametric
#' exponential tilting estimator.
#' @keywords internal
exptilt_nonparam <- function(data, ...) {
UseMethod("exptilt_nonparam")
Expand Down
2 changes: 2 additions & 0 deletions src_dev/engines/exptilt/impl/exptilt.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#' Methods are provided for `data.frame` and `survey.design`.
#' @param data A `data.frame` or a `survey.design`.
#' @param ... Passed to class-specific methods.
#' @return An engine-specific NMAR result object (for example
#' \code{nmar_result_exptilt}).
#' @seealso `exptilt.data.frame()`, `exptilt.survey.design()`, `exptilt_engine()`
#' @keywords internal
exptilt <- function(data, ...) {
Expand Down
2 changes: 2 additions & 0 deletions src_dev/engines/exptilt/s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NULL
#'
#' @param x An object of class `nmar_result_exptilt`.
#' @param ... Ignored.
#' @return `x`, invisibly.
#' @keywords result_view
#' @export
print.nmar_result_exptilt <- function(x, ...) {
Expand Down Expand Up @@ -76,6 +77,7 @@ print.nmar_result_exptilt <- function(x, ...) {
#' @param object An object of class `nmar_result_exptilt`.
#' @param conf.level Confidence level for confidence interval (default 0.95).
#' @param ... Ignored.
#' @return An object of class `summary_nmar_result_exptilt`.
#' @keywords result_view
#' @export
summary.nmar_result_exptilt <- function(object, conf.level = 0.95, ...) {
Expand Down