calibrate: Estimate Observations of X from a Given 'Y'

View source: R/operations.R

calibrateR Documentation

Estimate Observations of X from a Given Y

Description

Estimate Observations of X from a Given Y

Usage

calibrate(
  Y,
  Y_0,
  betas,
  Y_bar = mean(Y),
  X,
  m = 1,
  n = NROW(Y),
  p = NROW(betas),
  MSE,
  alpha = 0.05,
  simultaneous = FALSE,
  intercept_fitted = TRUE
)

Arguments

Y

Vector of Y observations used to fit the model

Y_0

Hypothetical Y observations on which to predict X

betas

Estimated regression coefficients.

Y_bar

Mean of the response vector Y. Will be computed if not provided.

X

Design matrix used to fit a model.

m

Number of new observations at each level of Y_0 to predict.

n

Number of rows in the design matrix.

p

Number of parameters in the model.

MSE

Estimated mean squared error.

alpha

Alpha level for confidence intervals.

simultaneous

Logical. Should Bonferroni-corrected simultaneous intervals be constructed for each prediction? Default FALSE.

intercept_fitted

Logical. Does the model contain an intercept parameter? Default FALSE.

Details

this function does inverse prediction, finding observations of X given observations of Y.

Value

3 \times h matrix of predictions with interval bounds, where h is n the number of observations predicted.


ryan-heslin/RegLesson documentation built on Aug. 5, 2022, 9:03 p.m.