pzivich / zEpid

Epidemiology analysis package

Home Page:http://zepid.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stochastic estimators: probability shift

pzivich opened this issue · comments

Summary:
Current stochastic estimators apply some (un)conditional probability based on specified covariates, (Pr(A=1|X)). An alternative approach is to produce a shift in the probability of treatment instead. This is a different framework for estimation of stochastic treatments that can be added fairly easily.

What this adds:
To the available stochastic estimator options will be added for the distribution shift in probabilities

Implementation plan:
Allow for p argument in the fit() function for these estimators to take an array of probabilities as an input. The input would be an array of treatment probabilities for each individual.

I should also consider adding some functionality that takes an input model to predict the treatment probabilities then produce the shifted probabilities. It seems like there are many ways to shift the probabilities, so it may be easier to have the user manipulate the new probability distribution rather than designing a new function. This step is TBD.

Note: I am going to use this procedure for stochastic estimators going forward. p will take a float or an array of floats (of len(df.shape[0])) as the input. This is easier than having the whole condition argument and doing all that. This is more versatile and avoids some complex code / internal management for the stochastic estimators