This is some beautiful documentation and cool package! What a nice tribute to Dr. Fox.
This is some beautiful documentation and cool package! What a nice tribute to Dr. Fox.
bart2() accepts weights, but they arenβt sampling weights. If you can show me Iβm wrong I would gladly change this! Thanks for the kind words about my work :) In the future please use github issues for this kind of question
But what if... I were to purchase propensity scores and disguise them as my own randomized trial? Delightfully devilish Seymour!
Counterfactuals! The causal effect of Omanyte vs. Kabuto! Great example :)
We used a DAG here: doi.org/10.1037/edu0...
Unfortunately not that useful but we used it!
Well, all the cities are named after colors, but not just red and green colors. Lavander is purple, Saffron is yellow, Fuschia is pink, Pewter is gray, etc.
It's so great to hear your perspective on this. Thank you for taking part in this discussion!
Because the relationship is nonlinear! A big benefit of the package is that it provides tools for testing and interpreting relationships that are not captured by a single regression coefficient. The outcome model can be arbitrarily complicated and the tools are still useful.
I'm @ ing you because I disagree with this take. I'd love to hear what you don't like about them, other than "package authors aren't accommodating well enough".
That's an even more complicated issue! Here, the treatment is static and scalar, but it can take on values on a continuum. For example, number of cigarettes smoked, medicine dosage, or particulate exposure levels. {adrftools} is model-agnostic; it uses g-computation to extract the ADRF.
Of course {marginaleffects} was the inspiration for {adrftools} and {adrftools} wouldn't be possible without using some {marginaleffects} functionality under the hood. But I do maintain that there is value added here. Of course, you should use whatever feels most productive for you.
With that specificity come improvements to interface, performance, documentation, and functionality, but only for the tasks that {adrftools} was designed to do. Analyses that would take many lines of code and minutes to run in {marginaleffects} can be done in seconds in one line with {adrftools}.
Sure, in the same way you can just cook your own food instead of going to a restaurant. π
There is lots of functionality in {adrftools} not available in {marginaleffects}. {marginaleffects} is a general purpose tool, and {adrftools} is specific.
I hope this test sees more use and is studied more deeply! Thanks for reading, and let me know if you have any questions about {adrftools} :)
8/8
Subgroup ADRFs in two groups stratified by Male
The ADRF contrast, the difference between the subgroup ADRFs. If there is no moderation, the contrast should be 0 everywhere.
The omnibus test for 0 moderation.
Some functions of the ADRF might have a fixed value under H0. For example, the difference between two subgroup ADRFs should be 0 everywhere if there is no moderation. In that case, we can replace the projection with the fixed value to test even more hypotheses:
7/8
The choice of projection is up to the user and doesn't have to be a flat line. For example, to test whether a linear model is sufficient to describe the ADRF, we can request a linear projection. If we reject H0, this implies the ADRF is nonlinear.
6/8
This test is similar in spirit to that developed in Westling (2022) doi.org/10.1080/0162...
In {adrftools}, the p-value can be computed using simulation, exact methods, or fast approximations, which @tslumley.bsky.social has written about on his blog (notstatschat.rbind.io/2024/09/13/t...).
5/8
This statistic can be approximated as a Riemann sum, which makes it the sum of correlated Gaussian variables, which, under the null hypothesis that the ADRF is equal to its flat projection, are centered around 0. Such a sum has a "generalized ΟΒ² distribution", for which the CDF can be computed.
4/8
This naturally leads to the following test statistic, which corresponds to the L2 norm of the deviation of the ADRF from its projection:
3/8
Similarly, lets say we have a projection of the ADRF, e.g., a flat line. This is also a Gaussian Process, and so is the difference between the ADRF and the projection at each point. If the ADRF is flat, there should be no difference between the ADRF and the flat projection.
2/8
Some more details on the omnibus test for whether the ADRF is flat, as I mention in this test. We have an estimate for the ADRF at each treatment value `a`, and jointly they have a multivariate normal distribution. This makes the ADRF estimate a Gaussian Process.
1/8
I would also say it exposes you to a lot of areas of statistics, including inference, machine learning, optimization, regression modeling, survey analysis, missing data, econometrics. etc. I don't think I would have been exposed to those if I had followed a traditional psychometrics path.
For me it was the sense that causal inference was used heavily in applied fields, and I was concerned with my work being used to make the world better. These days I've kind of lost that dream and now just like it because I find it interesting.
Yes, a JN plot is for studying interactions; this is a plot of the ADRF itself (closer to what you'd get with marginaleffects::plot_predictions()). I don't agree with JN methodology, so nothing like it is implemented, but you can validly ask when the confidence band excludes a certain value.
My hope is that by using this new tool for studying continuous treatments, we reduce the tendency to dichotomize treatments and extract as much information as we can from our data in a valid way. If you end up using {adrftools} in your work I'd love to know!
10/10
{adrftools} does a lot more, including producing different estimands, subset estimates, contrasts, and tests, and supports a large variety of models including Bayesian models (e.g., BART), relying on @vincentab.bsky.social's {marginaleffects} under the hood.
See its capabilities here:
9/10
The projection model coefficients can also be interpreted directly to provide a quantitative summary of the ADRF. This methodology was described in Neugebauer and van der Laan (2007) but seemingly never made it into applied work.
8/10
Though a picture is worth a thousand estimates, often it can be helpful to project the ADRF onto a simpler function to facilitate interpretation. {adrftools} lets you do this with your chosen projection model without committing to a specific functional form for the outcome model.
7/10
Omnibus test for whether the ADRF is flat.
I developed a new test for whether the ADRF is flat. If H0 is rejected, we can claim there is an effect of the treatment on the outcome. This test can be used with any model because it doesn't test any parameters in the model; it tests the difference between the ADRF itself and a flat line:
6/10
We can use `plot()` on the ADRF object to generate a plot of the ADRF. By default, the plot uses simultaneous confidence bands, as described in @pausalz.bsky.social's paper in the post below. It also uses the corrected g-computation variance estimator described by Hansen & Overgaard (2024).
5/10