Tests single or joint hypotheses of the regression parameters.
Parameters: | b0_vals : 1darray
param_nums : 1darray
print_weights : bool
ret_params : bool
method : string
stochastic_exog : bool
|
---|---|
Returns: | res : tuple
|
Examples
>>> import statsmodels.api as sm
>>> data = sm.datasets.stackloss.load()
>>> endog = data.endog
>>> exog = sm.add_constant(data.exog)
>>> model = sm.OLS(endog, exog)
>>> fitted = model.fit()
>>> fitted.params
>>> array([-39.91967442, 0.7156402 , 1.29528612, -0.15212252])
>>> fitted.rsquared
>>> 0.91357690446068196
>>> # Test that the slope on the first variable is 0
>>> fitted.test_beta([0], [1])
>>> (1.7894660442330235e-07, 27.248146353709153)