pspa_y
function conducts post-prediction M-Estimation.
Usage
pspa_y(
X_lab = NA,
X_unlab = NA,
Y_lab,
Yhat_lab,
Yhat_unlab,
alpha = 0.05,
weights = NA,
quant = NA,
intercept = FALSE,
method
)
Arguments
- X_lab
Array or data.frame containing observed covariates in labeled data.
- X_unlab
Array or data.frame containing observed or predicted covariates in unlabeled data.
- Y_lab
Array or data.frame of observed outcomes in labeled data.
- Yhat_lab
Array or data.frame of predicted outcomes in labeled data.
- Yhat_unlab
Array or data.frame of predicted outcomes in unlabeled data.
- alpha
Specifies the confidence level as 1 - alpha for confidence intervals.
- weights
weights vector PSPA linear regression (d-dimensional, where d equals the number of covariates).
- quant
quantile for quantile estimation
- intercept
Boolean indicating if the input covariates' data contains the intercept (TRUE if the input data contains)
- 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_y()
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
pspa_y(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")
#> Estimate Std.Error Lower.CI Upper.CI P.value Weight
#> 1.6121176 0.05486939 1.504576 1.7196596 9.605262e-190 0.9387851
#> X1 0.8468293 0.07314742 0.703463 0.9901956 5.388584e-31 1.0000000