View source: R/fuzzy_inference.R
compute_t_values | R Documentation |
Compute t-values for regression coefficients
compute_t_values(beta_hat, Y_fuzzy, Y_pred, XtX_inv)
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. |
Numeric vector of t-values for the regression coefficients.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.