compute_t_values: Compute t-values for regression coefficients

View source: R/fuzzy_inference.R

compute_t_valuesR Documentation

Compute t-values for regression coefficients

Description

Compute t-values for regression coefficients

Usage

compute_t_values(beta_hat, Y_fuzzy, Y_pred, XtX_inv)

Arguments

beta_hat

Numeric vector. Estimated regression coefficients.

Y_fuzzy

List. Observed fuzzy responses.

Y_pred

List. Predicted fuzzy responses.

XtX_inv

Matrix. Inverse of the XtX matrix.

Value

Numeric vector of t-values for the regression coefficients.

Examples

# Example setup
beta_hat <- c(0.5, 1.2)  # Example regression coefficients
Y_fuzzy <- list(
  list(l = 2.1, x = 2.3, r = 2.5),
  list(l = 3.1, x = 3.3, r = 3.5),
  list(l = 4.1, x = 4.3, r = 4.5)
)  # Example fuzzy response
Y_pred <- list(
  list(l = 2.0, x = 2.2, r = 2.4),
  list(l = 3.0, x = 3.2, r = 3.4),
  list(l = 4.0, x = 4.2, r = 4.4)
)  # Example predicted values
XtX_inv <- matrix(c(0.1, 0.2, 0.2, 0.4), ncol = 2)  # Example XtX_inv matrix
t_values <- compute_t_values(beta_hat, Y_fuzzy, Y_pred, XtX_inv)
print(t_values)

flex documentation built on Sept. 2, 2025, 9:09 a.m.

Related to compute_t_values in flex...