stueller / longCatEDA

R package for exploratory data analysis (EDA) with longitudinal or time-series categorical data (ordinal or nominal)
2 stars 2 forks source link

viz two variables at once #7

Open stueller opened 2 years ago

stueller commented 2 years ago

Idea from C. Lyman and USF: Hi! I am using longCatEDA(.) to do visualization for a project and was wondering if there is a way to implement this package to visualize two variables at once? I am interested in how two variables change over time together...

stueller commented 2 years ago

My response to Lyman's email:

This is a great idea that I have added to my to-do list. With the current version I would try the following:

  1. Stack the data (see mocked up example in the screenshot below)
  2. Treat ‘var’ as a grouping variable (type ?sorter in the R console to see how to plot grouped data)

The order of cases will not be the same within each group unless you override it with the customSort option of sorter(). But that may not be needed if your primary interest is how the two variables change overall across time rather than how individuals covary across time. Good luck, and thanks for the new feature idea.