Diff for "FAQ/ancreg" - CBU statistics Wiki
location: Diff for "FAQ/ancreg"
Differences between revisions 18 and 19
Revision 18 as of 2011-03-09 12:30:06
Size: 2589
Editor: PeterWatson
Comment:
Revision 19 as of 2011-03-09 12:30:48
Size: 2591
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:

Can I do an analysis of covariance using regression?

You can run an ancova using regression. Just put the group and covariates in as independent variables. Your regression estimate and its standard error, for the group term, is the difference between the two group means adjusted for the covariates.

You can also fit an ANCOVA and useful output such as estimated group regression means (adjusted for a covariate) in SPSS using the GLM univariate procedure found under analyze:General linear Model:univariate:options. SPSS calls the covariate adjusted means Estimated Marginal Means. 'Marginal' is used because group means (e.g. for males and females) are computed pooling across the covariate (e.g. using the overall age mean). We remove age differences and end up with (an age pooled one-way layout of) group means which are akin to looking at the (gender) edges or margins of a higher order (age by group two-way) table formed by collapsing across rows (e.g. ages ) to get overall column (e.g. gender) means. Chapter 7 of Boniface (1995) gives illustrations of computing ANCOVA adjusted means.

To obtain these covariate adjusted means put the group factor in the display means box (top right) and click the compare main effect box directly underneath and run the ancova as normal.

You also get the bonus of a 95% Confidence interval for the covariate adjusted difference in the group means.

Algebraically

$$ \mbox{Adjusted y group mean adjusted for x} = \bar{y} - B (\bar{x_text{G}} - \bar{x})$$

where B is the regression coefficient for X with group as the other predictor and Y as the response. The statistical significance of this difference can either be quoted reading off the t or F value for group (with x as the other predictor) from the regression or performing an unpaired t test on N-3 degrees of freedom on the adjusted Y group means using their standard errors:

The unpaired t statistic on N-3 df for the difference in a pair of adjusted group means =

$$\frac{\mbox{Difference in adjusted group means}}{\sqrt{\mbox{se1}text{2}+\mbox{se2}text{2}} $$

For three or more groups you have to enter them as dummy variables into the regression. These need to be added manually if using the linear regression procedure.

The GLM Univariate method, on the other hand, will create and fit these dummy variables all for you so saving you the effort of doing a regression.

Reference

Boniface D. R. (1995). Experiment design and statistical methods for behavioural and social research. Chapman and Hall:London.

None: FAQ/ancreg (last edited 2017-09-19 15:00:00 by PeterWatson)