Wide to long format part 2 - Pivoting with multivariate data

depression_wide dataset: quantpsych.net/data/depression_wide.csv
gaming dataset: quantpsych.net/data/gaming.csv
link to R document: quantpsych.net/data/11b-pivoting.R
Objectives
1. what complications non time-varying complications add
2. know what time varying variables are
3. Know how to use starts_with, ends_with, etc for pivoting
4. Know how to use gsub
5. Two ways to merge datasets

Пікірлер: 4

  • @normandaurelle814
    @normandaurelle8142 жыл бұрын

    I have not watched your videos for a while but i still like them. Thanks !

  • @arnau1717
    @arnau1717 Жыл бұрын

    Thank you so much for your tutorials, they are very useful. However, I have a question on the results of merging datasets with the functions that are showed in the video: 1- When merging datasets with the function full_join, the scores of depression and stress are repeated, so instead of having 4 timepoints for each variable you end up with those 4 timepoints repeated twice, then doubling the number of rows in your dataset (unnecessarily?). When using the mutate function to add columns, the results aren't repeated twice. Could you explain this, please? 2- Is it correct to merge more than two datasets with these functions or is it better to perform the lmem for each dataset separately? I have more than 5 time-varying variables

  • @natsumi883
    @natsumi883 Жыл бұрын

    thank you so much for your videos! they are really helping me with my analyses. i have a question, when i try to run the select(-()) function in r to temporarily get rid of the second variable i want to pivot, i get a bunch of errors. mainly an unexpected "," in the pivot_longer part of the code and a object not found for the column names i want to get rid of... the first part of the pivot_longer runs fine when i run it in its own. i've tried using : to selct the sequence of columns, i,ve tried writing each colunm name, seperated by , and ;. i_ve tried the starts.with() to select them by their prefix... what am I doing wrong?

  • @QuantPsych

    @QuantPsych

    Жыл бұрын

    Hard to tell without your actual code.