pub fn reset_test(
y_json: &str,
x_vars_json: &str,
powers_json: &str,
type_: &str,
) -> StringExpand description
Performs the RESET test for model specification error via WASM.
The RESET (Regression Specification Error Test) test checks whether the model is correctly specified by testing if additional terms (powers of fitted values, regressors, or first principal component) significantly improve the model fit.
§Arguments
y_json- JSON array of response variable valuesx_vars_json- JSON array of predictor arrayspowers_json- JSON array of powers to use (e.g., [2, 3] for ŷ², ŷ³)type_- Type of terms to add: “fitted”, “regressor”, or “princomp”
§Returns
JSON string containing the F-statistic, p-value, and interpretation.
§Errors
Returns a JSON error object if parsing fails or domain check fails.