Analysis of Covariance, Adjusted Means, Studytime Groups, Absences Covariate and Partial Eta Squared
One Way ANCOVA: Formula, Adjusted Means, SPSS, Python, R and Excel Guide
One Way ANCOVA compares group means on a numeric outcome after controlling for one continuous covariate. In this worked example, G3 final grade is compared across four studytime groups while controlling for absences. The result shows that studytime remains statistically significant after covariate adjustment, while absences is not statistically significant in the displayed ANCOVA p-value summary.
Google AdSense top placement reserved here
Quick Answer: One Way ANCOVA Result
The worked One Way ANCOVA example shows that studytime groups differ in G3 after controlling for absences. The Python p-value decision chart reports C(studytime) p = 2.547e-09, which is far below alpha = .05. The covariate absences has p = 0.1203, which is above .05 in this model.
The raw group means were 10.84, 12.09, 13.23 and 13.06. After adjusting at the overall mean of absences, the adjusted means were 10.87, 12.09, 13.18 and 13.03. The adjusted pattern remains almost the same as the raw pattern, meaning the studytime group difference is not explained away by absences.
Final interpretation: Studytime has a statistically significant adjusted effect on G3 after controlling for absences. The adjusted means show the same practical ranking as the raw means: group 1 is lowest, group 2 is higher, and groups 3 and 4 are highest. Absences has a visible downward scatter trend but does not reach statistical significance in the p-value summary.
Important reporting point: ANCOVA is not only a normal ANOVA with another variable added. It compares groups after adjusting the outcome to a common covariate value. The adjusted means are the main group comparison after the covariate is controlled.
Table of Contents
- What Is One Way ANCOVA?
- One Way ANCOVA Formula
- One Way ANCOVA Hypotheses
- Dataset and Variables Used
- Python Chart-by-Chart Interpretation
- R Chart-by-Chart Validation
- SPSS Output and Report PDFs
- SPSS, R, Python and Excel Workflows
- Code Blocks for One Way ANCOVA
- APA Reporting Wording
- Common Mistakes
- When to Use One Way ANCOVA
- Downloads and Resources
- Related Guides
- FAQs
What Is One Way ANCOVA?
One Way ANCOVA, or one-way analysis of covariance, compares one categorical factor on a numeric dependent variable while controlling one or more covariates. It is useful when the group comparison should be adjusted for a continuous variable that may be related to the outcome.
In this example, studytime is the group factor, G3 is the outcome, and absences is the covariate. The goal is to test whether studytime groups still differ in G3 after the analysis accounts for differences in absences.
The raw means and adjusted means are very close in this output. Group 1 stays lowest, group 2 stays in the middle, and groups 3 and 4 stay highest. That means the covariate adjustment did not remove the main studytime pattern.
Simple definition: One Way ANCOVA compares adjusted group means. In this example, it compares studytime groups on G3 after controlling for absences.
One Way ANCOVA is part of the broader ANCOVA and ANOVA family. It connects naturally with Fixed Effects ANOVA, Factorial ANOVA, ANOVA in Python, ANOVA in R, ANOVA in SPSS, ANOVA Assumptions, ANOVA Effect Size, Eta Squared, and Cohen’s F Formula.
One Way ANCOVA Formula
A one-way ANCOVA model includes a categorical group factor and a continuous covariate. The dependent variable is adjusted for the covariate before group means are interpreted.
For this worked example, the model becomes:
The studytime term tests whether adjusted G3 means differ across the four studytime groups. The absences term tests whether G3 is related to absences after studytime group differences are included.
Adjusted Mean Idea
The adjusted mean chart states that means are adjusted at the overall mean value of absences. This places all studytime groups on the same absences reference point before comparing G3.
Partial Eta Squared
The effect size chart reports partial eta squared of 0.064 for studytime and 0.004 for absences. This means the adjusted studytime effect is much larger than the adjusted absences effect in this model.
| ANCOVA Source | Visible Result | Decision | Interpretation |
|---|---|---|---|
| studytime | p = 2.547e-09 | Significant | Adjusted G3 means differ by studytime group. |
| absences | p = 0.1203 | Not significant at .05 | Absences does not explain a statistically significant adjusted part of G3 in this model. |
| studytime partial η² | 0.064 | Meaningful effect | Studytime has the larger adjusted contribution. |
| absences partial η² | 0.004 | Very small effect | Absences contributes little after studytime is included. |
One Way ANCOVA Hypotheses
One Way ANCOVA tests the adjusted group effect and the covariate effect. The group hypothesis is the main research question, while the covariate result explains whether the adjustment variable contributes significantly to the outcome.
| Effect | Null Hypothesis | Alternative Hypothesis | Decision in This Output |
|---|---|---|---|
| studytime | The adjusted G3 means are equal across studytime groups. | At least one adjusted G3 mean differs. | Reject H0 because p = 2.547e-09. |
| absences | Absences has no adjusted relationship with G3 after studytime is included. | Absences contributes significantly to G3 after studytime is included. | Do not reject H0 at .05 because p = 0.1203. |
Decision for this example: The adjusted studytime effect is statistically significant. The absences covariate is not statistically significant at alpha = .05 in the p-value summary. The final interpretation should focus on adjusted studytime differences, not on absences as a significant covariate.
Dataset and Variables Used
The worked example uses student performance data. The dependent variable is G3 final grade. The categorical factor is studytime, with four groups. The covariate is absences, which is included to adjust the G3 group comparison.
| Studytime Group | Raw Mean G3 | Adjusted Mean G3 | Interpretation |
|---|---|---|---|
| Group 1 | 10.84 | 10.87 | Lowest mean before and after absences adjustment. |
| Group 2 | 12.09 | 12.09 | Middle group, almost unchanged after adjustment. |
| Group 3 | 13.23 | 13.18 | Highest adjusted mean. |
| Group 4 | 13.06 | 13.03 | High adjusted mean with wider uncertainty. |
The adjusted means are extremely close to the raw means. That means the covariate adjustment slightly changes the group values but does not change the overall ranking. The strongest difference remains between studytime group 1 and the higher studytime groups.
For supporting concepts, review Descriptive Statistics, Mean Median and Mode, Standard Deviation, Standard Error, Confidence Interval, F Distribution, P Value, and Null and Alternative Hypothesis.
Google AdSense middle placement reserved here
Python Chart-by-Chart Interpretation
The Python chart sequence explains One Way ANCOVA through raw group means, adjusted group means, covariate scatter, p-value decisions, partial eta squared, group distributions, residuals versus fitted values and residual Q-Q diagnostics.
Python Chart 1: Raw Group Means

This chart shows the unadjusted mean G3 scores before controlling for absences. Studytime group 1 has a raw mean of 10.84, group 2 has 12.09, group 3 has 13.23, and group 4 has 13.06.
The raw pattern is clear. Group 1 is lowest, group 2 is higher, and groups 3 and 4 are in the highest score range. This is the group difference visible before covariate adjustment.
The chart provides the baseline comparison. The adjusted mean chart should be read next because ANCOVA interpretation depends on the adjusted comparison, not only the raw means.
Python Chart 2: Adjusted Means with 95% Confidence Intervals

This chart shows the ANCOVA-adjusted group means at the overall mean value of absences. The adjusted means are 10.87, 12.09, 13.18 and 13.03 for studytime groups 1 through 4.
The adjusted pattern remains very close to the raw pattern. Group 1 remains lowest, group 2 remains higher, and groups 3 and 4 remain highest. This means absences adjustment does not explain away the studytime difference.
The confidence interval for group 4 is wider than the other groups, so its adjusted mean is less precise. Even with that wider interval, group 4 stays in the high adjusted mean range.
Python Chart 3: Outcome by Covariate Scatter Plot

The scatter plot shows G3 on the vertical axis and absences on the horizontal axis. Most observations are clustered at lower absence values, especially between 0 and 10 absences. A smaller number of observations appear at higher absence values.
The overall dashed trend line slopes downward. This means higher absences are visually associated with lower G3 scores. However, the p-value chart shows absences p = 0.1203, so this covariate trend is not statistically significant at .05 in the displayed ANCOVA model.
The scatter chart is still useful because it explains why absences was included as a covariate. It shows the adjustment variable and the outcome together before reading the formal model results.
Python Chart 4: ANCOVA P-Value Decision Summary

This chart gives the formal ANCOVA decision. The studytime source is labelled C(studytime) p = 2.547e-09, which is far below alpha = .05. The absences source is labelled p = 0.1203, which is above alpha = .05.
The result means the adjusted studytime group effect is statistically significant. Absences is not statistically significant in this model, even though the scatter plot shows a downward visual trend.
This chart is the main decision chart for the post. It confirms that the adjusted group comparison remains significant after including the covariate.
Python Chart 5: Partial Eta Squared Summary

The effect-size chart shows that studytime has partial eta squared of 0.064, while absences has partial eta squared of 0.004. Studytime has the much larger adjusted contribution.
This effect-size pattern matches the p-value decision. Studytime is significant and has a meaningful adjusted effect size. Absences has a very small adjusted effect size in this ANCOVA model.
The chart supports reporting more than a p-value. It shows the practical size of the adjusted studytime effect and the small contribution of absences.
Python Chart 6: G3 Distribution by Studytime

The boxplot chart shows the distribution of G3 by studytime group. Groups 3 and 4 are centered higher than groups 1 and 2. Group 1 has the lowest center, while group 2 is between group 1 and the higher groups.
Low outlying values are visible in groups 1 and 2, including values near zero. These values help explain why the residual diagnostics show strong lower-tail departures.
The chart supports the adjusted result because the group distributions are not identical. The ANCOVA model then tests the adjusted group difference after adding absences as a covariate.
Python Chart 7: Residuals vs Fitted Values

The residuals-versus-fitted chart shows fitted values between roughly 10 and 13.5. Most residuals are spread around the zero line, but several negative residuals extend far below zero, reaching around -12.
The vertical banding appears because the model uses group differences and the covariate structure to generate fitted values. The spread shows that individual G3 values still vary strongly around the fitted ANCOVA means.
This chart supports diagnostic caution. The studytime effect is strong and significant, but the model does not perfectly explain every individual score.
Python Chart 8: Residual Q-Q Plot

The residual Q-Q plot shows clear departure from the reference line. The central residuals follow the general pattern, but the lower tail falls away strongly.
The strongest lower-tail points match the negative residuals seen in the residuals-versus-fitted plot and the low observations in the boxplots. This means residual normality is approximate rather than perfect.
The final report should include this diagnostic issue. The adjusted studytime result remains interpretable, but assumptions should be reported honestly.
R Chart-by-Chart Validation
The R validation chart sequence repeats the same One Way ANCOVA workflow in a second software environment. It confirms the raw means, adjusted means, covariate pattern, p-value decision, partial eta squared, distribution context and residual diagnostics.
R Chart 1: Raw Group Means

The R raw mean chart confirms the same pattern as the Python chart. Studytime group 1 is lowest, group 2 is higher, and groups 3 and 4 are highest.
The raw group mean structure gives the first visual explanation of the result. The groups are separated before the covariate adjustment is applied.
This validation chart confirms that the raw mean pattern is stable across software workflows.
R Chart 2: Adjusted Means with 95% Confidence Intervals

The R adjusted mean chart confirms that the adjusted studytime means remain separated. Group 1 remains lowest, group 2 remains in the middle, and groups 3 and 4 remain highest.
The adjustment for absences changes the means only slightly. This matches the interpretation that the studytime effect remains after controlling for the covariate.
The R chart validates the adjusted mean interpretation used in the Python section.
R Chart 3: Covariate Scatter by Group

The R scatter chart confirms the visual covariate pattern. Most students have low absence counts, and the overall trend line slopes downward.
The formal result still shows that absences is not significant at alpha = .05 in this model. The chart therefore supports including absences as context but not reporting it as a significant covariate effect.
This validation chart helps explain the difference between visual trend and formal ANCOVA decision.
R Chart 4: ANCOVA P-Value Decision Summary

The R decision chart confirms the same statistical conclusion. Studytime is far below the alpha line, while absences is above the alpha line.
The R chart labels the studytime p-value as 5.446e-10. This is still far below .05 and supports the same decision as the Python p-value chart.
The validation result is the same: the adjusted studytime effect is significant, and the covariate is not significant at alpha = .05.
R Chart 5: Partial Eta Squared Summary

The R effect-size chart confirms the same effect-size pattern. Studytime has partial eta squared around 0.064, while absences has partial eta squared around 0.004.
The studytime adjusted effect is clearly larger than the absences effect. This matches the Python effect-size chart and the p-value summary.
The R validation supports reporting studytime as the main ANCOVA effect.
R Chart 6: G3 Distribution by Studytime

The R boxplot chart confirms that groups 3 and 4 sit higher than groups 1 and 2. Group 1 remains the lowest distribution.
Low outlying values are visible again. These values explain why residual diagnostics later show lower-tail departure.
This validation chart confirms the same distribution context from the Python workflow.
R Chart 7: Residuals vs Fitted Values

The R residual chart confirms the same residual pattern. Residuals are centered around zero overall, but strong negative residuals appear in the lower tail.
This means the ANCOVA fitted values explain the group pattern but do not fully capture all individual student outcomes.
The chart supports diagnostic caution in the final article.
R Chart 8: Residual Q-Q Plot

The R Q-Q plot confirms the same lower-tail departure as the Python Q-Q plot. The middle part of the residual distribution follows the expected direction more closely than the lower tail.
This diagnostic pattern should be reported. It does not erase the significant adjusted studytime result, but it prevents overstating perfect model assumptions.
The R validation chart confirms that the residual issue is part of the data pattern rather than a software artifact.
SPSS Output and Report PDFs
The supplied report files support the One Way ANCOVA workflow. The R report validates the chart sequence, and the SPSS output PDF provides menu-based output for reporting and verification.
Download One Way ANCOVA R Report PDF
Download One Way ANCOVA SPSS Output PDF
Output Items to Read
| Output Item | What It Shows | How It Is Used | Reporting Meaning |
|---|---|---|---|
| Raw group means | Unadjusted G3 means by studytime. | Shows before-adjustment pattern. | Group 1 is lowest; groups 3 and 4 are highest. |
| Adjusted means | G3 means after controlling absences. | Main ANCOVA group comparison. | Studytime differences remain after adjustment. |
| Covariate scatter | G3 by absences across groups. | Shows visual covariate context. | Trend is downward, but absences is not significant in the p-value chart. |
| P-value summary | Studytime and absences p-values. | Formal decision chart. | Studytime significant; absences not significant at .05. |
| Partial eta squared | Studytime = 0.064, absences = 0.004. | Effect-size comparison. | Studytime has the larger adjusted contribution. |
| Boxplots | G3 distributions by group. | Shows spread and outliers. | Low values explain residual lower-tail issues. |
| Residual diagnostics | Residuals vs fitted and Q-Q plot. | Assumption checking. | Residual normality is approximate, not perfect. |
Report interpretation summary: The One Way ANCOVA output supports a significant adjusted studytime effect on G3. Adjusted means remain separated after controlling for absences. Absences is not statistically significant in the displayed model and has a small partial eta squared. Residual diagnostics show lower-tail departures, so the final report should include assumption caution.
Google AdSense in-content placement reserved here
SPSS, R, Python and Excel Workflows for One Way ANCOVA
The same One Way ANCOVA workflow can be reproduced in SPSS, R, Python and Excel. The key requirement is a numeric outcome, a categorical factor, and a continuous covariate.
SPSS Workflow
| Step | SPSS Menu or Syntax | Purpose |
|---|---|---|
| Open data | File > Open > Data | Load G3, studytime and absences. |
| Run GLM Univariate | Analyze > General Linear Model > Univariate | Fit ANCOVA model. |
| Set dependent variable | Dependent Variable: G3 | Define outcome. |
| Set fixed factor | Fixed Factor: studytime | Define group comparison. |
| Set covariate | Covariate: absences | Adjust group means for absences. |
| Request options | Descriptives, parameter estimates, effect size, homogeneity tests | Support interpretation and assumptions. |
| Request adjusted means | Estimated Marginal Means for studytime | Report adjusted group means. |
| Export output | OUTPUT EXPORT | Save SPSS output PDF. |
R Workflow
| Step | R Action | Purpose |
|---|---|---|
| Read data | read.csv("dataset.csv") | Load dataset. |
| Convert factor | as.factor(studytime) | Define studytime as categorical. |
| Fit ANCOVA | lm(G3 ~ studytime + absences) | Run one-way ANCOVA model. |
| ANOVA table | car::Anova(model, type = 3) | Get p-values for factor and covariate. |
| Adjusted means | emmeans(model, ~ studytime) | Get adjusted means and confidence intervals. |
| Effect size | Partial eta squared | Estimate adjusted contribution. |
| Diagnostics | Residual and Q-Q plots | Check assumptions. |
Python Workflow
| Step | Python Action | Purpose |
|---|---|---|
| Read data | pandas.read_csv() | Load G3, studytime and absences. |
| Fit ANCOVA | ols("G3 ~ C(studytime) + absences") | Fit adjusted group model. |
| ANOVA table | sm.stats.anova_lm(model, typ=2) | Get p-values and sums of squares. |
| Adjusted means | Predict group means at mean absences | Create adjusted mean table. |
| Partial eta squared | SS_effect / (SS_effect + SS_error) | Estimate effect sizes. |
| Diagnostics | Residuals vs fitted and Q-Q plot | Check model assumptions. |
Excel Workflow
| Excel Task | Formula or Tool | Purpose |
|---|---|---|
| Prepare data | Columns for G3, studytime and absences | Set up ANCOVA variables. |
| Create dummy variables | Indicator columns for studytime groups | Represent categorical factor in regression. |
| Run regression | Data Analysis ToolPak > Regression | Fit G3 using studytime dummies and absences. |
| Adjusted predictions | Use mean absences with each group dummy pattern | Estimate adjusted means. |
| Partial eta squared | Use model sums of squares | Calculate effect size if SS components are available. |
| Formal ANCOVA | Use SPSS, R or Python | Excel is useful for support but not ideal as the main ANCOVA engine. |
Code Blocks for One Way ANCOVA
SPSS Syntax for One Way ANCOVA
* One Way ANCOVA in SPSS.
* Outcome: G3.
* Factor: studytime.
* Covariate: absences.
TITLE "One Way ANCOVA: G3 by Studytime Controlling Absences".
UNIANOVA G3 BY studytime WITH absences
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/PRINT=DESCRIPTIVE ETASQ HOMOGENEITY PARAMETER
/EMMEANS=TABLES(studytime) WITH(absences=MEAN) COMPARE ADJ(BONFERRONI)
/CRITERIA=ALPHA(.05)
/DESIGN=absences studytime.
OUTPUT EXPORT
/CONTENTS EXPORT=VISIBLE
/PDF DOCUMENTFILE="one_way_ancova_output.pdf".Python Code for One Way ANCOVA
import pandas as pd
import statsmodels.api as sm
from statsmodels.formula.api import ols
df = pd.read_csv("dataset.csv")
df["G3"] = pd.to_numeric(df["G3"], errors="coerce")
df["absences"] = pd.to_numeric(df["absences"], errors="coerce")
df["studytime"] = df["studytime"].astype("category")
df_model = df.dropna(subset=["G3", "studytime", "absences"]).copy()
# One Way ANCOVA model
model = ols("G3 ~ C(studytime) + absences", data=df_model).fit()
# ANCOVA table
ancova_table = sm.stats.anova_lm(model, typ=2)
print(ancova_table)
# Partial eta squared
ss_error = ancova_table.loc["Residual", "sum_sq"]
partial_eta = {}
for source in ["C(studytime)", "absences"]:
ss_effect = ancova_table.loc[source, "sum_sq"]
partial_eta[source] = ss_effect / (ss_effect + ss_error)
print(partial_eta)
# Adjusted means at overall mean absences
mean_absences = df_model["absences"].mean()
groups = sorted(df_model["studytime"].cat.categories)
adjusted_rows = []
for g in groups:
new_data = pd.DataFrame({
"studytime": pd.Categorical([g], categories=df_model["studytime"].cat.categories),
"absences": [mean_absences]
})
adjusted_mean = model.predict(new_data)[0]
adjusted_rows.append({"studytime": g, "adjusted_mean_G3": adjusted_mean})
adjusted_means = pd.DataFrame(adjusted_rows)
print(adjusted_means)
# Diagnostics
df_model["fitted"] = model.fittedvalues
df_model["residual"] = model.resid
print(df_model[["G3", "studytime", "absences", "fitted", "residual"]].head())R Code for One Way ANCOVA
library(tidyverse)
library(car)
library(emmeans)
df <- read.csv("dataset.csv")
df$G3 <- as.numeric(df$G3)
df$absences <- as.numeric(df$absences)
df$studytime <- as.factor(df$studytime)
df_model <- df %>%
select(G3, studytime, absences) %>%
drop_na()
# One Way ANCOVA model
model <- lm(G3 ~ studytime + absences, data = df_model)
# Type III ANCOVA table
Anova(model, type = 3)
# Adjusted means
emmeans(model, ~ studytime)
# Pairwise adjusted comparisons
pairs(emmeans(model, ~ studytime), adjust = "bonferroni")
# Partial eta squared manually from Type II/III table if SS values are extracted
anova_model <- anova(model)
anova_model
# Diagnostics
plot(model)Excel Notes for One Way ANCOVA
Excel support workflow for One Way ANCOVA:
1. Keep columns:
G3, studytime, absences
2. Create dummy variables for studytime:
studytime_2, studytime_3, studytime_4
Keep studytime group 1 as the reference group.
3. Run regression:
Dependent variable = G3
Predictors = studytime_2, studytime_3, studytime_4, absences
4. Calculate adjusted means:
Use the model equation.
Set absences equal to the overall mean absences.
Change group dummy values to represent each studytime group.
5. Interpret:
Studytime group coefficients test adjusted group differences.
Absences coefficient tests the covariate effect.
Use SPSS, R or Python for formal ANCOVA tables and effect sizes.APA Reporting Wording
When reporting One Way ANCOVA, state the outcome, factor, covariate, adjusted group result, covariate result, effect size and diagnostic context. The adjusted means should be reported because they are the key ANCOVA comparison.
APA-style report: A one-way ANCOVA was conducted to compare G3 final grade across four studytime groups while controlling for absences. The adjusted effect of studytime was statistically significant, p = 2.547e-09, partial η² = 0.064. The covariate absences was not statistically significant in the displayed model, p = 0.1203, partial η² = 0.004. Adjusted means were 10.87, 12.09, 13.18 and 13.03 for studytime groups 1 through 4. Residual diagnostics showed lower-tail departures, so the result was interpreted with diagnostic caution.
Short reporting version: Studytime had a significant adjusted effect on G3 after controlling for absences, p < .001, partial η² = 0.064. Absences was not significant, p = 0.1203. Adjusted means showed group 1 lowest and groups 3 and 4 highest.
Common Mistakes
| Mistake | Why It Is Wrong | Correct Practice |
|---|---|---|
| Reporting raw means only | ANCOVA compares adjusted means. | Report adjusted means at the covariate reference value. |
| Ignoring the covariate p-value | The covariate may or may not contribute significantly. | Report absences p = 0.1203 and partial η² = 0.004. |
| Calling absences significant from the scatter trend alone | The p-value chart shows absences above .05. | Use the model p-value for formal interpretation. |
| Ignoring effect size | P-values do not show practical size. | Report partial eta squared and review Eta Squared. |
| Ignoring residual diagnostics | The Q-Q plot shows lower-tail departure. | Discuss diagnostics and review Q-Q Plot Normality Check. |
| Using ANCOVA when slopes differ strongly by group | ANCOVA assumes comparable covariate slopes unless interaction is modeled. | Check homogeneity of regression slopes before final reporting. |
When to Use One Way ANCOVA
Use One Way ANCOVA when you have one categorical factor, one numeric outcome and one continuous covariate that should be controlled before comparing group means. In this example, studytime groups are compared on G3 after adjusting for absences.
| Situation | Use One Way ANCOVA? | Reporting Note |
|---|---|---|
| One categorical factor and one numeric outcome | Yes, if a covariate must be controlled | Report adjusted means. |
| Covariate is continuous and relevant | Yes | Check covariate relationship with outcome. |
| No covariate is needed | Use one-way ANOVA | See ANOVA in Python. |
| Two categorical factors exist | Use factorial ANCOVA or GLM | Compare with Factorial ANOVA. |
| Assumptions are weak | Use caution | Review ANOVA Assumptions and residual diagnostics. |
One Way ANCOVA should be compared with ANCOVA, Fixed Effects ANOVA, Factorial ANOVA, Balanced ANOVA, Brown Forsythe ANOVA, ANOVA in SPSS, ANOVA in R, ANOVA Effect Size, and T Test vs ANOVA.
Downloads and Resources for One Way ANCOVA
Use these resources to reproduce the One Way ANCOVA workflow. The R report and SPSS output PDF are included as verification files. Script and workbook placeholders can be replaced after the final downloadable files are uploaded to the WordPress Media Library.
Download Dataset
Practice dataset with G3, studytime and absences variables.
Download One Way ANCOVA R Report PDF
R report PDF for adjusted means, p-values, effect size and diagnostics.
Download One Way ANCOVA SPSS Output PDF
SPSS output PDF for ANCOVA interpretation and reporting.
Download Python Script
Python code for ANCOVA, adjusted means, partial eta squared and diagnostics.
Download R Script and Excel Workbook
R workflow and Excel support workbook for One Way ANCOVA summaries.
FAQs About One Way ANCOVA
What is One Way ANCOVA?
One Way ANCOVA compares groups on a numeric outcome after controlling for a continuous covariate.
What variables were used in this example?
The outcome was G3, the factor was studytime, and the covariate was absences.
Was studytime significant after controlling absences?
Yes. The Python p-value summary showed C(studytime) p = 2.547e-09, which is below .05.
Was absences significant in this One Way ANCOVA?
No. The p-value summary showed absences p = 0.1203, which is above .05.
What were the adjusted means?
The adjusted means were 10.87, 12.09, 13.18 and 13.03 for studytime groups 1 through 4.
What was the partial eta squared for studytime?
The partial eta squared for studytime was 0.064.
What was the partial eta squared for absences?
The partial eta squared for absences was 0.004.
Why are adjusted means important in ANCOVA?
Adjusted means compare groups after placing them at a common covariate value. They are the main group comparison in ANCOVA.
Can One Way ANCOVA be done in Excel?
Excel can support ANCOVA using regression with dummy variables and a covariate, but SPSS, R or Python is better for formal ANCOVA tables and adjusted means.
How do I report this One Way ANCOVA in APA style?
A concise report is: Studytime had a significant adjusted effect on G3 after controlling absences, p < .001, partial η² = 0.064. Absences was not significant, p = 0.1203.
