Diff for "FAQ/ancreg" - CBU statistics Wiki
location: Diff for "FAQ/ancreg"
Differences between revisions 23 and 24
Revision 23 as of 2011-03-09 15:28:41
Size: 3583
Editor: PeterWatson
Comment:
Revision 24 as of 2011-03-09 15:29:38
Size: 3691
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
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: where B is the regression coefficient for X with group as the other predictor and Y as the response. Notice from this formula that there will be no adjustment for X if the two groups share the same X mean.

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:

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{Y group mean adjusted for x} = \bar{y_text{G}} - 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. Notice from this formula that there will be no adjustment for X if the two groups share the same X mean.

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 example suppose we wish to compare the difference between actual and predicted feelings between two equal sized groups of size 7 adjustedpredtced feelings. We can fit an ANCOVA in SPSS using the UNIVARIATE procedure (syntax below) and obtain F(1, 11)=3.44, p=0.09.

UNIANOVA
  DIFFERENCE  BY GROUP  WITH ESTIMATED
  /METHOD = SSTYPE(3)
  /INTERCEPT = INCLUDE
  /EMMEANS = TABLES(DIFFERENCE) WITH(GROUP=MEAN)
  /CRITERIA = ALPHA(.05)
  /DESIGN = GROUP ESTIMATED .

The adjusted means are also outputted using the /EMMEANS subcommand and are 3.73 and 1.98 for the two equal sized groups respectively both with a standard error of 0.667. The unpaired t test gives (3.73-1.98) /sqrt(2 0.667^2) = 1.85 which equals 3.44 when it is squared since a F(1,dfe) is the square of a t(dfe) so the two approaches are equivalent for equal sized group (as here). In general, the ANCOVA and unpaired t test approaches will give very similar results if the groups are of similar sizes.

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)