This page outlines a basic workflow to help you get started using the cohortED package to analyze student mobility, cohort persistence, and longitudinal performance trends.
This package is designed for education analysts who want reproducible, transparent, and interpretable reporting tools.
1. Prepare Your Dataset
To use the cohortED package, your dataset must include a few key fields. These are used to assign students to cohorts and track grade-level progress over time.
Required Fields
These fields are essential for all functions to operate correctly:
ID: A unique student identifier (e.g., state or district student ID).
YEAR: The academic year. Accepts numeric values (e.g., 2023) or academic year formats (e.g., "2023–24" or "2023_2024").
GRADE: The student’s grade level. Accepts numeric values (e.g., 3, 5, 11) or character values (e.g., "K", "PK", or "PREK").
Recommended Fields
Including these fields improves the utility of cohort tracking, reporting, and analysis:
Assessment-related, such as CONTENT_AREA, SCALE_SCORE, ACHIEVEMENT_LEVEL, PROFICIENCY_LEVEL, etc.
Demographics, such as GENDER, ETHNICITY, ELL_STATUS, IEP_STATUS, etc.
Understanding student trends often starts with clear, consistent visuals.
Visualization Across the Package
While plot_ functions are dedicated to creating visualizations, several analyze_, compare_, and summarize_ functions also include built-in plots to support interpretation.
These may include:
Alluvial diagrams of grade/mobility pathways
Cohort retention heatmaps
Achievement and mobility bar charts
Longitudinal line plots of proficiency or participation
What Do These Functions Return?
Most functions that produce visualizations return a list with:
One or more ggplot2 plot objects
Cleaned or summarized datasets
Tables for reporting or further use
This design supports flexibility and integration into automated reports.
Use core functions to assign students to cohorts or compare performance across groups.
Analyze Student Cohorts
Functions like analyze_student_cohorts() and analyze_cohort_persistence() help organize student data into entry-based cohorts and track how those cohorts persist across years and grade levels.
They return cleaned datasets, summary tables, and visual components that support cohort-based reporting.
Compare Mobility Groups
Functions like compare_achievement_mobility() and compare_mobility_counts() summarize performance and enrollment trends across mobility groups such as Stay, Join, and Leave.
These are useful for identifying subgroup differences and are often paired with reporting or plotting functions.