Message Boards Message Boards

GROUPS:

Interpret a LinearModelFit ANOVATable?

Posted 12 days ago
159 Views
|
4 Replies
|
0 Total Likes
|

Having evaluated the code below,

data = {{0, 2}, {1, 0}, {2, 1}, {3, 8}, {4, 8}, {5, 6}, {6, 7}}

lm = LinearModelFit[data, {x, x^2}, x]

lm["ANOVATable"]
lm["ParameterTable"]

Show[ListPlot[data], Plot[lm[x], {x, 0, 10}], Frame -> True]

what is the meaning of the ANOVATable p-values list (what statistics and hypotesis is it related)? Which table (ANOVATable or ParameterTable) p-values should I use for regression model coefficients significiance inference? Where can I get detailed information (in Mathematica help it is very poor )?

Attachment

Attachments:
4 Replies

One can conclude from your ANOVA table that none of the variables{1,x,x^2) has a decisive influence on Y (see https://en.wikipedia.org/wiki/Analysis_of_variance). Your parameter table show that the variance of the estimators of the coefficients is excessive (see https://en.wikipedia.org/wiki/Student%27s_t-test). In addition, you should have a look on the R^2:

lm["RSquared"]
lm["AdjustedRSquared"]

giving respectively 0.608234 and 0.412351. Rather poor, because the model is too complex. A degree one model is better:

lm = LinearModelFit[data, {x}, x]
lm["ANOVATable"]
lm["ParameterTable"]
lm["RSquared"]
lm["AdjustedRSquared"]
Show[ListPlot[data], Plot[lm[x], {x, 0, 10}], Frame -> True]

But the Pvalue of the intercept is very large, while the adjusted R^2 is just slightly better... Thus, it's better to choose a simpler one:

m = LinearModelFit[data, {x}, x, IncludeConstantBasis -> False]
lm["ANOVATable"]
lm["ParameterTable"]
lm["RSquared"]
lm["AdjustedRSquared"]
Show[ListPlot[data], Plot[lm[x], {x, 0, 10}], Frame -> True]

giving 0.827217 as adjusted R^2, for Y=1.43 x.

Posted 11 days ago

Thanks for the reply. Could you, please, tell me, what is the equation for calculation two F-staistics presenting in regression ANOVATable above? (I know how F-statistics is calculated for ordinary variance analysis and how it can be interpreted, but I know nothing about it in regression case).

Your response variable consists of integers. Are these counts? rounded measurements? made-up data? If the responses are counts, you might want to consider Poisson regression (using GeneralizedLinearModelFit). A little background on the data might be helpful because performing statistical methods requires more than just the numbers

Posted 11 days ago

It is just an illustrative example, not real data to be analyzed. My main question - what do ANOVATable F-statistics and p-values mean for regression case.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract