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

Cross price elasticity calculation question. #1

Open
dragutcl opened this issue Aug 5, 2024 · 1 comment
Open

Cross price elasticity calculation question. #1

dragutcl opened this issue Aug 5, 2024 · 1 comment

Comments

@dragutcl
Copy link

dragutcl commented Aug 5, 2024

In the cross_price_elasticity.R file, in the line with comment "keep sales of sku as target and price of all other skus as other variables", the code following is not excluding the sku in the current loop but instead includes all the skus rather than all other skus.

input = df_casted %>% # keep sales of sku as target and price of all other skus as other variables
select(str_subset(names(df_casted), 'average_price'), target_variable)

If own elasticity is needed, then comment should be corrected to reflect the logic.

@MatCyt
Copy link
Owner

MatCyt commented Aug 6, 2024

Hey,
Thanks a lot for finding the time to open an issue here. I'm really happy that people still seem to stumble apon the repo I've created few years back. That said it's been a long time since I've last used R or worked on similar set of problems.
If there is an issue you'd like to fix I'm happy to take a pull request to fix it.

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