Publications by Karlerik Naslund

Week 7 Lecture

05.03.2025

CORRELATION Correlation (as we will be using it, the Pearson Correlation) is a valuable tool to analyze data. Perhaps ironically, it is rarely reported in academic work (typically in favor of different types of regression), however it’s a useful tool when investigating data … as long as you are aware of the dangers. The idea behind correlation ...

7316 sym R (8642 sym/45 pcs) 4 img

Week 7 Review

04.03.2025

Week 7 Review Parametric tests require at least four assumptions: Data (or residuals) are normally distributed Variance is homogenous Interval data (numbers) Variables are independent How to tell if data is normally distributed: # first, visual inspection: hist(mtcars$mpg,probability = T) lines(density(mtcars$mpg),col='red',lwd=2) qqnorm(mtcars...

552 sym 4 img

Data Selection

04.03.2025

library(readxl) library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.4 ✔ tid...

14 sym R (20681 sym/9 pcs) 2 img

in class review wk 6

26.02.2025

How to load data: Getting Started with Homework Videos Modern Statistics with R, Chapter 2 R for Data Science, Chapter 1 Creating new data frames: library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2...

1401 sym R (1487 sym/14 pcs) 1 img

Week 6 Lecture

26.02.2025

Assumptions of linear models (parametric tests): Data (or residuals) are normally distributed Variance is homogeneous (the same) or normalized the errors in the data do not change based on their position within the data (the model is accurate equally across all values) Interval data the data should be continuous and numerical Variables are ind...

7712 sym 16 img

Homework 3

19.02.2025

library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1 ## ...

722 sym R (2667 sym/14 pcs) 1 img

Week 4 Lecture

18.02.2025

Recap on Dispersion library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.4 ✔...

4935 sym R (10234 sym/65 pcs) 10 img

Week 3 Lecture

05.02.2025

When you make an Rmarkdown file, always keep this chunk: Recap By now you have some familiarity with R as a concept. Let’s discuss data sources and how they can be brought into R. #set your working directory to the folder with "district.xls" library(readxl) library(tidyverse) ## ── Attaching core tidyverse packages ────────�...

3461 sym R (34980 sym/48 pcs) 8 img

Homework 2

04.02.2025

library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1 ## ...

14 sym R (746 sym/11 pcs)

Homework 1

04.02.2025

R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the...

591 sym 1 img