---
title: "Planning"
output: rmarkdown::html_vignette
description: >
  How to plan a workflow in R to treat student-level records.
vignette: >
  %\VignetteIndexEntry{Planning}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
bibliography: ../inst/REFERENCES.bib
link-citations: yes
always_allow_html: true
---

```{r child = "../man/rmd/common-setup.Rmd"}
```

```{r}
#| include: false
knitr::opts_chunk$set(fig.path = "../man/figures/art-010-")
```


Analysis of MIDFIELD data begins by identifying the groups of students, programs, and metrics with which we intend to work. 

## Workflow

Working with MIDFIELD data is iterative---intermediate results often cause us to revisit an earlier assumption or select a different bloc or student attributes to work with. Nevertheless, a completed analysis usually comprises the following steps in roughly the sequence given below. Accented entries indicate topics in the open article. 

1. `r accent("Planning")`  
    - `r accent("Records")`  
    - `r accent("Programs")`  
    - `r accent("Metrics, blocs, and groupings")`  
1. Initial processing 
    - Data sufficiency 
    - Degree seeking  
    - Identify programs  
1. Blocs
    - Ever-enrolled  
    - FYE proxies  
    - Starters  
    - Graduates  
1. Groupings    
    - Program labels  
    - Demographics    
    - Other variables 
1. Metrics  
    - Graduation rate  
    - Stickiness  
1. Displays 
    - Multiway charts  
    - Tables  



## Definitions

```{r child = "../man/rmd/define-student-level-data.Rmd"}
```

```{r child = "../man/rmd/define-program.Rmd"}
```

```{r child = "../man/rmd/define-metric.Rmd"}
```

```{r child = "../man/rmd/define-bloc.Rmd"}
```

```{r child = "../man/rmd/define-grouping-variables.Rmd"}
``` 





## Which records?

There are currently two points of access to MIDFIELD data: 

```{r child = "../man/rmd/note-midfielddata-and-midfield.Rmd"}
``` 

*To load research data.* &nbsp; For users with access to the MIDFIELD database, data are imported using any "read" function, e.g., 

```{r}
#| eval: false

# Not run
student <- fread("local_path_to_student_research_data")
course <- fread("local_path_to_course_research_data")
term <- fread("local_path_to_term_research_data")
degree <- fread("local_path_to_degree_research_data")
```

*To load practice data.* &nbsp; Load from the midfielddata package.  

```{r}
#| eval: false
# Load practice data
library(midfielddata)
data(student, course, term, degree)
```

The variables in the practice data are a subset of those in the research data. 
A researcher transitioning from working with the practice data to the research data should find that their scripts need little (if any) modification. 

```{r child = "../man/rmd/note-for-practice-only-2.Rmd"}
```





## Which programs? 

Identify programs in *general* terms, for example, 

- All Engineering  
- Engineering, Business, Social Sciences, and Arts and Humanities  
- Electrical Engineering and Computer Engineering  

Search the `cip` data set included with midfieldr to identify the 6-digit CIP codes relevant to a study.

*Note.* &nbsp; Most of our examples involve engineering programs. However, MIDFIELD research data contain student-level records of *all undergraduates in all programs* at their institution over the time spans given.








## Which metrics, blocs, and groupings?

Before the data processing starts, we have to decide the metrics we want to compare among which blocs of students grouped by what variables. Metrics can include bloc counts or comparative ratios, for example:

- Blocs, e.g., counts of starters, graduates, migrators, etc. 
- Four-year persistence 
- Six-year graduation rate  
- Six-year stickiness  

The metric determines the blocs to gather, for example:

- Graduation rate requires a bloc of starters and the subset who graduate in their starting program. 
- Stickiness requires the bloc of ever enrolled in a program and the subset who graduate in that program. 

The research study design determines the grouping variables, for example,  

- Completion status is a critical variable whenever graduation (program completion) is involved.  
- Programs, race/ethnicity, and sex are important grouping variables in many studies. 
- Other student-level variables such as institution, GPA, grade level, etc., can also be used for grouping and summarizing.  













## References

<div id="refs"></div>

```{r child = "../man/rmd/common-closing.Rmd"}
```

