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

car_lamb() not working for regrouped apply_market_model() results #14

Open
keegangclarke opened this issue Aug 26, 2022 · 1 comment
Open

Comments

@keegangclarke
Copy link

Hi Mr Rudnytskyi,
I hope you are well.

I am a master's student at UCT in South Africa, and am making use of your package estudy2 for a large part of my analysis for my dissertation.
Thank you for providing the package!

Please could you assist me with a problem I am finding with the car_lamb() testing function.

I have a fairly large dataset of equity prices.
I run your package process (as illustrated in the vignette), and record the results of apply_market_models(). I then take these returns objects and reorganise copies into the four different levels of ICB Industry classifications (in descending order; industry, supersector, sector, subsector).

Then I run the all tests on these new groupings, namely
parametric_tests(), nonparametric_tests(), car_parametric_tests(), car_nonparametric_tests().
This functions without error on the larger groupings (i.e. Industry & Supergroup).

However, when I attempt to apply car_parametric_tests() on the smaller groupings, the car_lamb() function runs into the following error:

Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 5, 4 In addition: Warning message: In '/.default' (event_means, sd) : longer object length is not a multiple of shorter object length

Despite my best efforts, I have not discovered why this does not work with the smaller groupings. This error is exactly the same for each subgrouping that throws it.

I need to demonstrate that this is something to do with the smaller groupings, and not the data since the same data and the same market models are used in each grouping.

P.S. I skip every group that is less than or equal to 2 in size.

@irudnyts
Copy link
Owner

@keegangclarke, sorry, I cannot recall -- did we have an exchange via email?

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