-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description:
Now in function generate_response_vector_linear
we use np.random.randn
to generate random error terms from the standard normal distribution. This creates a problem for its pytest function: Ideally we want to compare the actual value and the theoretical value of the response vector. However, now we have this random error term which can be any value in theory. Even though 95% of chance it will fall into [-1.96, 1.96], if the betas or the column values are small, it can still have a huge impact on the magnitude of the response vector. Raised in #19.
Question:
How do we test the function generate_response_vector_linear
works given the problem stated above?
Current compromised solution:
I set a high tolerance for the sample response value.
Possible solutions:
- Get around and do not test by comparing the values.
- Set a random seed to fix the error terms.
- Create an instance variable
response_vector_w/o_error
to store the response vectors without random error term.