This is an inital internal exploratory data report for the Well Being Tracker assessments at baseline and 90 days. The code is not optimized and will be improved in the case we want to run it for all secondary reports.
Here is the outline for the document:(1) Distribution of Assessment Duration, (2) Distribution of Assessment around 90 Days, (3) Difference between Assessment I and Assessment II, (4) What’s driving the difference?, (5) Let’s look at Domain Differences and (6) Modelling Change with engagement and social indicators.
A few suggestions after looking at the data: (1) Balance between expanding the interval and getting large enough sample size - The data is pretty spread out around weeks around the 90th day will get us an extra 1000 users which is 15% of the full dataset.(2) Income is too granular a variable. I combined some categories in analysis. (3)
The following code is just initialization: setting the window and calling the R script with the db connections and functions to call the dbs.
setwd("/home/joannerodrigues")
source("/home/joannerodrigues/config/dbutil.R")
## Loading required package: DBI
source("/home/joannerodrigues/config/dbcon.R")
The following is calling the databases:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.