install.packages("tidyverse")2 Overview
2.1 Presentation Outline
Self introduction
-
Goal of this class
Delivery method of class materials
Assignments
Policy
Weekly schedule
Brief introduction to statistical software
2.2 Self Introduction
2.3 My job
2.4 Your turn
Tell me:
- Your name
- Your department and program
- Why you are interested in Experimental design
2.5 About this class
No examination
Three graded homework assignments, plus a Homework 0 demo, with multiple-choice questions and light calculations
Provide big picture and general directions rather than statistical details
A lot of empirical examples
All materials use R!
2.6 This Course is:
- Required for Graduate Certificate in Educational Statistics and Research Methods
- Prerequisite to Multiple Regression and Applied Multivariate Statistics
- to provide the broad picture of one of the most popular research design - group comparisons
2.7 Learning Path of Graduate Certificate
- 01 ESRM 64003 Educational Statistics & Data ProcessingBuild statistical foundations Core
- 02 ESRM 64103 Experimental DesignDesign and analyze group comparisons You are here
- 03 ESRM 64203 Multiple RegressionModel multivariable relationships Core
- 04 ESRM 64503 Applied Multivariate StatisticsExtend analysis to multiple outcomes Elective
- 05 ESRM 65203 Structural Equation ModelingTest complex latent-variable models Elective
- 01 ESRM 64003 Educational Statistics & Data ProcessingBuild statistical foundations Core
- 02 ESRM 64103 Experimental DesignDesign and analyze group comparisons You are here
- 03 ESRM 64203 Multiple RegressionModel multivariable relationships Core
- 04 ESRM 66503 Measurement and EvaluationDevelop assessment foundations Elective
- 05 ESRM 67503 Item Response TheoryApply modern test theory Elective
2.8 Class Time
- Unit 1 (17:00 - 17:45): Lectures about concepts
- Unit 2 (18:00 - 18:45): Examples
- Unit 3 (19:00 - 19:45): (Optional) Self Practice with R Code on your laptop and Ask Questions
2.9 What To Expect This Semester
Philosophy: Focus on accessibility + learning-by-doing
The class heavily emphasize on hands-on task-oriented practices
No anxiety-prone tasks (e.g., hand calculations, memorizing formulas)
No anxiety-prone methods of evaluation (e.g., timed tests)
Materials:
Lecture slides present concepts—the what and the why
Example documents: reinforce the concepts and demonstrate the how using software—R packages
All available at the course website (hosted outside of Blackboard)
- Let me can show you how to use the website
2.10 Assignments and Grading
Participants will have the opportunity to earn up to 100 total points in this course.
Up to 80 points can be earned from three homework assignments.
Up to 20 points may be earned from submitting in-class quiz. In-class quiz will be delivered randomly in class. These will be graded on effort only—incorrect answers will not be penalized.
Bonus points (2 points)
- There may be other opportunities to earn extra credit at the instructor’s discretion.
Assignment Deadlines:
- Assignments must be submitted by the stated deadline. If you know you will be unavailable when an assignment is due, make arrangements to complete and submit it in advance.
2.11 Homework Delivery Format
2.12 Our Other Responsibility
My job (besides providing materials and assignments):
Answer questions via email, in individual meetings, or in group-based zoom office hours—you can each work on homework during office hours and get immediate assistance (and then keep working)
- Email me first
Your job (in descending order of timely importance):
Ask questions—preferably in class, but any time is better than none
Frequently review the class material, focusing on mastering the vocabulary, logic, and procedural skills
Don’t wait until the last minute to start homework, and don’t be afraid to ask for help if you get stuck on one thing for more than 15 minutes
- Please email me (jzhang@uark.edu) a screenshot of your code+error so I can respond easily
Practice using the software to implement the techniques you are learning on data you care about
Do the readings for a broader perspective and additional example (best after the lecture)
2.13 More About Your Experience in this Class
Attendance: Expected at the graduate level
Please do not attend in-person if you might be sick!
Please do not attend if you received the inclement weather notification
You can also join the class via Zoom
You won’t miss out: I will post YouTube recordings (audio + screen share) by requested at the course website.
Changes will be sent via email by 9 am on class days
I will update the homework and in-class quiz links on class days. If not uploaded, then there are two situations: (1) I forget to do that. I will re-upload later and notify you by emails. (2) I decide not to upload it or remove it.
I may change to zoom-only for dangerous weather or if I am sick.
2.14 Statistical Software
I will show examples primarily using R and R packages. Some important R packages include:
Tidyverse: a comprehensive R package including multiple mini packages for multiple data cleaning, data transformation.
ggplot2: a popular package for data visualization
Why not SPSS?
SPSS could only be used for some—but not all–of our content
More importantly, it doesn’t have as much room to grow; R has many new packages being developed via CRAN and GitHub
Why not SAS?
SAS is not open-sourced, meaning that we cannot check source code if something goes wrong
SAS is also commercial, but R is free
2.15 What We Will Cover
- Hypothesis Testing
- ANOVA
- One-way
- Two-way
- Repeated-measure
- ANCOVA
- Linear Mixed Model
3 Unit 2: Brief Introduction to R
3.1 Why R?
There are some point to consider
R packages are only as good as their authors (so little quality control)
Syntax and capabilities are idiosyncratic to the packages
The good things are:
If you really master R, you can do by yourself (write your own algorithm for complex model)
You can check the source code of R packages and know where issues come from
You can communicate with R package authors and provide some suggestions
You can be R package author yourself and be famous
3.2 What is R
R is an comprehensive statistical and graphical programming language
We can use R language via multiple graphical user inferences or IDE, i.e., terminal, VS Code or RStudio.
We will mainly focus on RStudio because of its convenience
Rstudio is a product of posit company and is free to use for personal use
3.3 RStudio User Interface
3.4 More RStudio
3.5 Installation of R and RStudio
Download and install the current version of R from CRAN:
After installing R, download and install the current version of RStudio Desktop from Posit.
After installation of R and RStudio, you can open up the RStudio to start your R programming.
however, your R only has the base package
To enhance its utility, most users will install R packages for certain purposes
3.6 R packages
R packages are uploaded to some platforms (i.e., CRAN or Github) by researchers or companies
Those R packages typically have their version numbers. Some functions may be available for some version (like Ver. 1.1) but not be available in other versions.
Do not upgrade your packages if you code is running well
R users are free to download and use those R packages
To download certain package, you should know package name
For example, if you want to download the latest version of
tidyversepackage, you can type in following command in the console panel of Rstudio
- Or if you want to install the older version of package
library(devtools) install_version("tidyverse", version = "1.3.0", repos = "http://cran.us.r-project.org")- If you find some error message like:
Error in `unknown_function()`: ! could not find function "unknown_function"
3.7 More about R packages
- CRAN (Comprehensive R Archive Network) is a network of servers around the world that store identical, up-to-date, versions of code and documentation for R.
- It contains most stable version of packages.
- Most of time, we download package from CRAN
- Github is for the fast development for R packages
It contains the up-to-date version of R which may potentially be unstable
You can download the package from Github using
pakpackagepak::pak("tidyverse/ggplot2")You can update the package and its dependencies
pak::pkg_install("ggplot2", upgrade = TRUE)
3.8 R functions
To operate certain tasks, you need to use functions contained in R packages
Note: Package is loaded in your session before you can call the function name without specifying the package name
install.packages("remotes") # if you did not install the remotes package before library(remotes) remotes::install_github("JihongZ/ESRM64103", force = TRUE)
3.9 R functions (Cont.)
Question: How do you know whether the package has been loaded or not
You can use
sessionInfofunctionsessionInfo()R version 4.5.2 (2025-10-31) Platform: aarch64-apple-darwin20 Running under: macOS Tahoe 26.5.2 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1 locale: [1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8 time zone: America/Chicago tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] digest_0.6.39 fastmap_1.2.0 xfun_0.56 Matrix_1.7-4 [5] lattice_0.22-9 httpgd_2.0.4 reticulate_1.45.0 glue_1.8.0 [9] knitr_1.51 htmltools_0.5.9 png_0.1-8 rmarkdown_2.30 [13] lifecycle_1.0.5 cli_3.6.5 unigd_0.2.0 vctrs_0.7.1 [17] grid_4.5.2 systemfonts_1.3.1 compiler_4.5.2 tools_4.5.2 [21] pillar_1.11.1 evaluate_1.0.5 yaml_2.3.12 Rcpp_1.1.1 [25] otel_0.2.0 rlang_1.1.7 jsonlite_2.0.0
sessionInfo()outputs multiple info:R version, Operations System, Matrix operation package, Locale
Attached packages (you can call the functions of those package)
Loaded package via a namespace (and not attached), which you cannot call functions and need to
libraryorrequirethem
3.10 Run R code
After you finish R script, you have multiple ways of running the code:
Method 1: you can click
Runbutton in the top right-head of RstudioMethod 2: you can select certain code and press
Ctrl + Enter(Win) orCommand + Return(Mac)Method 3: you can
Rscript [FILENAME].rto run the whole scriptMethod 4: you can using R notebook to interactively run R code
| Script file is .R | Script file is .rmd or .qmd | |
|---|---|---|
| Run the whole script |
|
|
| Run the partial script |
|
|
3.11 Summary
- Note that the syllabus, schedule, and all materials are uploaded online the week before class.
- We learn that R, Rstudio, and Quarto (.qmd) can be used to execute R code/syntax.
- In-class quiz will be administered randomly. Should be quick and easy. Don’t be stressful ever!
- Office hours are Monday from 2:00 PM to 4:00 PM or by appointment. Feel free to stop by my office or contact me with questions.
3.12 Next Week
3.12.1 Reading
SWE-bench: Can Language Models Resolve Real-world Github Issues?
3.12.2 Open Questions
- What experimental design do you observe in this paper?
- Which aspects of the design or findings match your expectations?
- Which aspects of the design or findings are unexpected?








