Likelihood ratio test to test whether restricted model is correct
Parameters : | restricted : Result instance
|
---|---|
Returns : | lr_stat : float
p_value : float
df_diff : int
|
Notes
D=-2\log\left(\frac{\mathcal{L}_{null}} {\mathcal{L}_{alternative}}\right)
where \mathcal{L} is the likelihood of the model. With D distributed as chisquare with df equal to difference in number of parameters or equivalently difference in residual degrees of freedom
TODO: put into separate function, needs tests