r-causal / causal_inference_r_workshop Goto Github PK
View Code? Open in Web Editor NEWCausal Inference in R Workshop
Home Page: https://r-causal.github.io/causal_workshop_website/
Causal Inference in R Workshop
Home Page: https://r-causal.github.io/causal_workshop_website/
Would help resolve potential confusion around what the numbers on the axes mean
We create a dataset wait_times
but we accidentally use seven_dwarfs
instead for the subsequent sections
Can probably be done with a second pivot and summarize. The benefit of this would be that we can show it's equal to the ordinary adjusted lm() estimate
re: the continuous example. May need to switch to a later time.
Need to update the book example if so
need to get propensity's continuous functionality up and running to streamline the last bit
e.g. slides/raw
, slides/html
, slides/pdf
When the add_difference()
method for survey objects is ready
Closely related to the cont. section re-work which I will post a separate issue for
dagitty::adjustmentSets()
directly. Stretch goal?Seems appearance of "lung" cancer is a typo and should be "liver"
We'll have to be mindful of updating solutions any time we update the exercises
Down the line, we should set up a workshop website (something like this:https://rr-in-r-workshop.netlify.app/)
A student suggested we address interpretations a bit more. This might be better suited for the book, though, e.g. reporting causal analyses or something. @LucyMcGowan, what do you think?
For some reason the DAG is rendering weird for me: https://causal-inference-r-workshop.netlify.app/12-whole_game-2.html#5
Does it look huge on your screen @malcolmbarrett?
Several people encountered this, and so did I!
I've given the following 4 rules in the past which help identify when/why an association exists between variables. Not necessary to belabor it in the lectures, but could be a useful touchpoint to understand what dag_paths() is doing under the hood.
There are pros and cons to revisiting the same question in different ways. We need to let this marinate
https://evalsp21.classes.andrewheiss.com/example/matching-ipw/
Mostly for the DAG part so students have to actually think it through
Which supersedes cidata. Not urgent.
Better enhance the question slide, in particular, specify the inclusion/exclusion criteria such as "must be current smoker" according to a target trial type question
maybe not add a separate set of exercises but have students just fill in group by or something
This pops up in the whole game exercises, for example
> smk_wt_dag |>
Warning messages:
1: Unknown or uninitialised column: `segment.alpha`.
2: Unknown or uninitialised column: `segment.alpha`.
3: Unknown or uninitialised column: `segment.alpha`.
4: Unknown or uninitialised column: `segment.alpha`.
+ ggdag(text = FALSE, use_labels = "label")
I searched a bit through {ggdag} but wasn't able to find an obvious source. Not urgent since things work as-is, would just be good to fix to tidy and prevent questions.
@LucyMcGowan in the G-comp section we do a loss-to-follow-up model to account for censoring using the NHEFS data. Do we have anything we can use for that in the Disney data sets?
For basic calculation, it's not too rough to get SMDs with the smd pkg + dplyr
library(smd)
library(dplyr, warn.conflicts = FALSE)
mtcars %>%
mutate(wts = runif(n())) %>%
summarise(
across(
c(mpg, disp, hp),
~smd(.x, am, wts)$estimate)
)
#> mpg disp hp
#> 1 -1.808428 2.198783 1.064067
Created on 2021-09-02 by the reprex package (v2.0.1)
Additionally, gtsummary will have SMDs in a new update, potentially supporting weights. It also supports fully-weighted tables via survey and gtsummary::tbl_svysummary()
.
I think we should break this up into two steps 1) SMDs, weighted SMDS, love plots & friends with smd()
2) creating weighted tables with gtsummary + survey
slide 16:
e.g.
And make sure we use that approach throughout
https://causal-inference-r-workshop.netlify.app/08-pscore-diagnostics.html#/smd-in-r-1
I think this should be color and group method
not weights
Since the code which uses {propensity} is less verbose, it should probably now fit in the third pane in each of the example slides
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.