Home > database >  Facet_wrap individual-level data by time and treatment status (ggplot2)
Facet_wrap individual-level data by time and treatment status (ggplot2)

Time:10-20

I have a survey data structured as follows: The survey tracks the self-reported "mood" for individuals with depression problems every 3 days between Sept 3rd through Sept 12th. All observations are exposed to treatment on Sept 9th, 2012. The survey contains 400 unique observations, but some observations drop out after the treatment.

Here is a data example:

individual  date            mood         treatment 
McCfly      2012-09-03.     sad           pre
McCfly      2012-09-06.     sad            pre
McCfly      2012-09-09.     happy          post 
McCfly      2012-09-12.     happy          post
Cartman   2012-09-03.       sad           pre
Cartman  2012-09-06.        sad            pre
Cartman  2012-09-09.        sad            post 
Cartman    2012-09-12.      neutral        post
Mackey   2012-09-03.       sad            pre
Mackey  2012-09-06.        sad             pre
Mackey  2012-09-09.        happy             post 

I want to visualize each person's self-reported happiness throughout 1) time and 2) treatment status, but I am not sure if a enter image description here

  • Related