Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial has hidden code that reader should be aware of #1

Open
hollina opened this issue Nov 11, 2020 · 0 comments
Open

Tutorial has hidden code that reader should be aware of #1

hollina opened this issue Nov 11, 2020 · 0 comments

Comments

@hollina
Copy link
Owner

hollina commented Nov 11, 2020

Brought up by Anthony Liu.

A few things are have echo = FALSE option set on the R-chunk. This was done to hide messy code unrelated to tutorial. While it's all available in the .Rmd file, it is confusing to the reader who is trying to copy and paste the visible code from the tutorial as it will not work as expected without some of this hidden code.

To do: Alex needs to separate messy code that should be hidden from code that could be "brought forward."

Notes from Anthony below for future reference.

Issues occur in Evaluating synthetic control fit, Calculate pre-treatment sd, and Store Cohen's D in each period for cross-validated lambda.

Specific issues: PreTreatmentSD <- sd(unlist(SCUL.output$y.actual[1:(SCUL.input$TreatmentBeginsAt-1),])) out of echo = FALSE and StandardizedDiff <- abs(SCUL.output$y.actual-SCUL.output$y.scul)/PreTreatmentSD names(StandardizedDiff) <- c("scul.cv") and StandardizedDiff <- abs(SCUL.output$y.actual-SCUL.output$y.scul)/PreTreatmentSDnames(StandardizedDiff) <- c("scul.cv")

Coady thinks that adding this line Results.y.StandardizedDiff <- (SCUL.output$y.actual-SCUL.output$y.scul)/sd(unlist(SCUL.output$y.actual[1:(SCUL.input$TreatmentBeginsAt-1),])) fixes some of the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant