pop_M {POPInf}R Documentation

POP-Inf M-Estimation

Description

pop_M function conducts post-prediction M-Estimation.

Usage

pop_M(
  X_lab = NA,
  X_unlab = NA,
  Y_lab,
  Yhat_lab,
  Yhat_unlab,
  alpha = 0.05,
  weights = NA,
  max_iterations = 100,
  convergence_threshold = 0.05,
  quant = NA,
  intercept = FALSE,
  focal_index = NA,
  method
)

Arguments

X_lab

Array or DataFrame containing observed covariates in labeled data.

X_unlab

Array or DataFrame containing observed or predicted covariates in unlabeled data.

Y_lab

Array or DataFrame of observed outcomes in labeled data.

Yhat_lab

Array or DataFrame of predicted outcomes in labeled data.

Yhat_unlab

Array or DataFrame of predicted outcomes in unlabeled data.

alpha

Specifies the confidence level as 1 - alpha for confidence intervals.

weights

weights vector POP-Inf linear regression (d-dimensional, where d equals the number of covariates).

max_iterations

Sets the maximum number of iterations for the optimization process to derive weights.

convergence_threshold

Sets the convergence threshold for the optimization process to derive weights.

quant

quantile for quantile estimation

intercept

Boolean indicating if the input covariates' data contains the intercept (TRUE if the input data contains)

focal_index

Identifies the focal index for variance reduction.

method

indicates the method to be used for M-estimation. Options include "mean", "quantile", "ols", "logistic", and "poisson".

Value

A summary table presenting point estimates, standard error, confidence intervals (1 - alpha), P-values, and weights.

Examples

data <- sim_data()
X_lab <- data$X_lab
X_unlab <- data$X_unlab
Y_lab <- data$Y_lab
Yhat_lab <- data$Yhat_lab
Yhat_unlab <- data$Yhat_unlab
pop_M(Y_lab = Y_lab, Yhat_lab = Yhat_lab, Yhat_unlab = Yhat_unlab,
      alpha = 0.05, method = "mean")
pop_M(Y_lab = Y_lab, Yhat_lab = Yhat_lab, Yhat_unlab = Yhat_unlab,
      alpha = 0.05, quant = 0.75, method = "quantile")
pop_M(X_lab = X_lab, X_unlab = X_unlab,
      Y_lab = Y_lab, Yhat_lab = Yhat_lab, Yhat_unlab = Yhat_unlab,
      alpha = 0.05, method = "ols")

[Package POPInf version 1.0.0 Index]