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

Converting tau when data is log transform #2

Open
ciberger opened this issue May 13, 2022 · 1 comment
Open

Converting tau when data is log transform #2

ciberger opened this issue May 13, 2022 · 1 comment

Comments

@ciberger
Copy link

Hey! thanks for your package

I've been playing around with it as an extension of Google's CausalImpact tool.

Got a dataset with market data having different scales, so log transformation is needed. However, I couldn't transform back ATT from its value estimated from log input data to one unscaled. Which formula should I use? Also, is it possible to get confidence interval for tau?

@MasaAsami
Copy link
Owner

MasaAsami commented May 14, 2022

Hi! Thank you for your comment.

However, I couldn't transform back ATT from its value estimated from log input data to one unscaled.

As a simple example, consider a linear model. Think about the meaning of the following x1 coefficient when the outcome variable Y is log-transformed.

image

As you can see from this

β1 means "Y increases by β1( = log Y'- log Y) when x1 increases by 1".

Since log(1 + y) can be approximated as y, the following transformation is possible:
log Y'- log Y = log(Y'/Y)
      = log(1 + (Y' - Y)/Y )
       ~ (Y' - Y) / Y

In other words, we can think of it as "Y increases by β% as x1 increases by 1.
This is the same in this model, which can be interpreted as an ATT of {tau}%!

I apologize if I misread the intent of your question.

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

2 participants