Publications by Kareena del Rosario

Introduction to Lavaan: Mediation and SEM

23.09.2024

This is a short introduction to using Lavaan for mediation and SEM models. I’m using a very basic SEM model with a latent variable and single outcome. pkgs <- c("tidyverse", "dplyr", "haven", "foreign", "lme4", "nlme", "lsr", "emmeans", "afex", "kni...

21531 sym 5 img 1 tbl

How Interactions Change the Interpretation of Main Effects

24.03.2024

Interpreting main effects with and without an interaction term Without an interaction term \[conflict = b_0 + b_1sleep_1 + b_2stress_2 + \epsilon\] \(b_0\): is the intercept (predicted outcome) when the predictors are 0. \(b_1\): represents the slope (main effect) of sleep. \(b_2\): represents the slope (main effect) of stress. Here, only the inte...

5387 sym

Robust Regression, Moderation, and Mediation

06.03.2024

To see a summary of the regression assumptions and more ways run test diagnostics, see our previous lab pkgs <- c("tidyverse", "dplyr", "haven", "foreign", "lme4", "nlme", "lsr", "emmeans", "afex", "knitr", "kableExtra", "car", ...

54270 sym Python (30748 sym/90 pcs) 16 img 2 tbl

Introduction to Linear Regression

28.02.2024

pkgs <- c("tidyverse", "dplyr", "haven", "foreign", "lme4", "plyr", "nlme", "lsr", "emmeans", "afex", "knitr", "kableExtra", "QuantPsyc", "car", "readxl", "pastecs") packages <- rownames(installed.packages()) p_to_install <- pkgs[!(pkgs %in% packages)] if(length(p_to_install) > 0){ install.packages(p_to_install) } lapply(pkgs, library, charact...

28936 sym 16 img 1 tbl

Using contrasts to understand ANOVA - SOLVED

26.02.2024

In this dataset, participants are assigned to 1 of 3 conditions: Control condition (recalled a neutral event) Sad actor (recalled a sad event) Sad partner (recalled a neutral event but was paired with the sad actor) These data are dyadic, but for the sake of this tutorial, we’re going to ignore that and treat participants as independent. Load ...

62534 sym Python (35862 sym/137 pcs) 10 img 10 tbl

Centering, contrast coding, and the two-level crossed model

26.02.2024

To demonstrate centering, contrast coding, and two-level crossed models, we’re going to use a few different datasets. Continuous predictors: centering Let’s say you’re interested in the effect of perceived social support on anxiety. Anxiety can vary both between- and within-person. The question is, are you interested in the within-person eff...

9850 sym Python (15845 sym/55 pcs) 2 img 2 tbl

Using contrasts to understand ANOVA

21.02.2024

In this dataset, participants are assigned to 1 of 3 conditions: Control condition (recalled a neutral event) Sad actor (recalled a sad event) Sad partner (recalled a neutral event but was paired with the sad actor) These data are dyadic, but for the sake of this tutorial, we’re going to ignore that and treat participants as independent. Load ...

40540 sym Python (17985 sym/74 pcs) 9 img 10 tbl

Using contrasts to understand ANOVA

21.02.2024

In this dataset, participants are assigned to 1 of 3 conditions: Control condition (recalled a neutral event) Sad actor (recalled a sad event) Sad partner (recalled a neutral event but was paired with the sad actor) These data are dyadic, but for the sake of this tutorial, we’re going to ignore that and treat participants as independent. Load ...

40534 sym Python (17985 sym/74 pcs) 9 img 10 tbl

Introduction to T-tests in R

11.02.2024

Prep the data # read in data data <- read_xlsx("/Users/kareenadelrosario/Desktop/local r code/regression_code/data_ttest.xlsx") head(data) ## # A tibble: 6 × 102 ## `Response ID` GENDER AGE PARTY TWITTER TRUST RU1 RU2 RU3 RU4 RU5 ## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 R_0cj5dsJg2wf...

2065 sym Python (10547 sym/54 pcs) 11 img

Chi-Squares in R

11.02.2024

Knowledge check! What type of test would you use for each of the following scenarios? They say that there is a 50/50 chance of getting heads (or tails) when you flip a coin. You want to put it to the test by flipping a coin 100 times to see if it matches those chances. What test would you use? The meditation app, Headspace, has released a new vers...

3034 sym R (12485 sym/44 pcs) 5 img