vdorie / dbarts

Discrete Bayesian Additive Regression Trees Sampler
56 stars 21 forks source link

BART with panel data? #33

Open ignacio82 opened 4 years ago

ignacio82 commented 4 years ago

I recently came across this paper that talks about how well BART performs with panel data. I always thought of BART as a cross sectional method. Am I wrong?. I was wondering if dbarts can be used with panel data. If so, do you have an example?

vdorie commented 3 years ago

Hi Ignacio. Sorry for the slow response, but this semester has been quite busy.

You can use base BART for panel data, however it probably makes more sense to impose some sort of structure over the model over the exchangeable units. Although experimental, stan4bart would allow you to explicitly set some parametric forms how subjects vary. Or you could use it with splines for the temporal component but allow individual level predictors to contribute nonparametrically. I'm not saying base-BART should be bad with panel data, but I would expect that are more directed solution might outperform it. Modified versions of BART should do just fine.

kaseyzapatka commented 7 months ago

@vdorie, I was wondering if there have been any updates in modeling longitudinal data with BART models? Is stan4bart still the best option here?

Background: I'm in the early stages of a project that will have 3-5ish years of data. It's a research grant from a federal/state organization so it's still unclear how many years we'll get and how useable it will be. We're trying to figure out how a standard BART specification might change if we add a few years of data to look at change in our outcome either over time between years or from the base (starting) year.

vdorie commented 7 months ago

There could well be another BART solution out there - unfortunately I’m out of academia and don’t have the time to follow other developments. But you can certainly use stan4bart for this like you would any longitudinal data (e.g. https://lme4.r-forge.r-project.org/slides/2011-03-16-Amsterdam/2Longitudinal.pdf) with BART handling non-linearities.

On Fri, Jan 26, 2024 at 3:24 PM Kasey Zapatka @.***> wrote:

@vdorie https://github.com/vdorie, I was wondering if there have been any updates in modeling longitudinal data with BART models? Is stan4bart still the best option here?

Background: I'm in the early stages of a project that will have 3-5ish years of data. It's a research grant from a federal/state organization so it's still unclear how many years we'll get and how useable it will be. We're trying to figure out how a standard BART specification might change if we add a few years of data to look at change in our outcome either over time between years or from the base (starting) year.

— Reply to this email directly, view it on GitHub https://github.com/vdorie/dbarts/issues/33#issuecomment-1912650475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5P4FK4RQDOT5XHDT7UL3YQQGGNAVCNFSM4P3HMH32U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRGI3DKMBUG42Q . You are receiving this because you were mentioned.Message ID: @.***>

ignacio82 commented 7 months ago

https://github.com/google/longbet might be of interest.