Skip to content

Chapter 19 - Sensitivity by Model Band #423

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

Open
flpgrz opened this issue Jan 25, 2025 · 0 comments
Open

Chapter 19 - Sensitivity by Model Band #423

flpgrz opened this issue Jan 25, 2025 · 0 comments
Assignees

Comments

@flpgrz
Copy link

flpgrz commented Jan 25, 2025

Hi, I have a question on the Sensitivity by Model Band section of Chapter 19.

Why do we compute the sensitivity for each band like this using a single variable linear regression model?

@curry
def sensitivity(data, y, t):
        # line coeficient for the one variable linear regression 
        return (np.sum((data[t] - data[t].mean())*(data[y] - data[y].mean())) /
                np.sum((data[t] - data[t].mean())**2))

I am struggling to understand why this model is used here, while a few cells above we are computing the sensitivity differently using (y(t+h) - y(t)) / h with OLS with interaction terms. For instance, couldn't why compute the mean of the sensitivity we already have for each band?

Thanks

@flpgrz flpgrz changed the title Chapter 19 Chapter 19 - Sensitivity by Model Band Jan 25, 2025
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