Closed waynew99 closed 2 years ago
Great first pull request, Wayne! :)
Hi Wayne, This is looking great. In terms of how the equation should appear, can you take a look at the multiple regression module (click show best fit line/plane). We do want the variable names to appear in the equation (instead of "x" and f(x). For the "corrected" line, we should also include the coefficient on Sleep. I am not sure how that is getting reported in the regression output in javascript, but it should be there somewhere. Happy to hop on zoom and explain any of this if needed.
Best,
Tanya
Tanya Byker
Associate Professor, Economics
Middlebury College @.**@.>
From: Amanda Gregg @.> Sent: Monday, June 6, 2022 2:24 PM To: ProfessorAmanda/econsimulations @.> Cc: Byker, Tanya S. @.>; Review requested @.> Subject: Re: [ProfessorAmanda/econsimulations] show regression equation (PR #283)
Great first pull request, Wayne! :)
— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FProfessorAmanda%2Feconsimulations%2Fpull%2F283%23issuecomment-1147750013&data=05%7C01%7Ctbyker%40middlebury.edu%7Cc7dc072c3214444d9be808da47e9d7f1%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901366917968138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=S3O7vtegKNX9w6%2B8man%2Fbq9q8urC86VhDbmvd4qJ%2Bfc%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP65VZ63TBBP4JEH772NLVDVNY67DANCNFSM5YADMH4Q&data=05%7C01%7Ctbyker%40middlebury.edu%7Cc7dc072c3214444d9be808da47e9d7f1%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901366917968138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=i14LwuC87kpG%2BOkiQ8E6hPLJv%2BsCRfyaXPjqNEoiOmk%3D&reserved=0. You are receiving this because your review was requested.Message ID: @.***>
Hi Professors,
Thanks for the explanations!
Just to confirm, we want
TestScore = beta0 + beta1 * StudyHours + delta * SleepHours + epsilon
My understanding is that the user sets beta1
and delta
, and we supply beta0
and epsilon
.
beta1
and delta
, we put the values that the user defines.beta0
, currently, it is hard coded as 40. Should we put 40 or beta0 in the equation?epsilon
, I see it coming from a normal distribution. What should we put here in place of epsilon?Thanks, Wayne
Hi Wayne, For the naive regression:
TestScore= estimated_beta_0 (this is the estimated intercept) + estimated_beta_1 * StudyHours + u_i (just the greek symbol, not a number)
For the corrected regression
TestScore= estimated_beta_0 (this is the estimated intercept from the second regression and yes, it should be close to the input value) + estimated_beta_1 StudyHours + estimated_deltaSleepHours + u_i (just the greek symbol, not a number)
Sorry, it didn't work very well to type it out. Let me know if that makes sense.
Tanya
Tanya Byker
Associate Professor, Economics
Middlebury College @.**@.>
From: Wayne Wang @.> Sent: Monday, June 6, 2022 3:20 PM To: ProfessorAmanda/econsimulations @.> Cc: Byker, Tanya S. @.>; Review requested @.> Subject: Re: [ProfessorAmanda/econsimulations] show regression equation (PR #283)
Hi Professors,
Thanks for the explanations! Just to confirm, we want TestScore = beta0 + beta1 StudyHours + delta SleepHours + epsilon
My understanding is that the user sets beta1 and delta, and we supply beta0 and epsilon.
Thanks, Wayne
— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FProfessorAmanda%2Feconsimulations%2Fpull%2F283%23issuecomment-1147810107&data=05%7C01%7Ctbyker%40middlebury.edu%7C541aabdcb5cb4e1716b608da47f19474%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901400155879855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pNqn%2BCMAV2X0eZyRL9%2ByxBSEZEz%2BqkaMG%2BMfEClaRls%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP65VZ4745MYVCYKTN3ETG3VNZFOZANCNFSM5YADMH4Q&data=05%7C01%7Ctbyker%40middlebury.edu%7C541aabdcb5cb4e1716b608da47f19474%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901400155879855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ySv0vbYlo4tuSiq9hL4fLm40rZfwXdarMIv6pWQQuKE%3D&reserved=0. You are receiving this because your review was requested.Message ID: @.***>
Thanks! It does make sense.
I've also moved it to the bottom of the graph due to the length of the equation (it's probably not ideal to split one equation into two lines).
Please let me know if I didn't understand correctly!
Best, Wayne
Hi Wayne, The two equations should be different. For the example listed:
The naive regression: it looks like the estimated intercept is around 65, and should have an estimated beta_1 much closer to zero. Also, in the naive regression, the delta should not appear as technically, sleep is in the error term in that initial regression.
The corrected regression line looks correct.
Does this make sense?
Best,
Prof. Byker
Tanya Byker
Associate Professor, Economics
Middlebury College @.**@.>
From: Wayne Wang @.> Sent: Monday, June 6, 2022 4:12 PM To: ProfessorAmanda/econsimulations @.> Cc: Byker, Tanya S. @.>; Review requested @.> Subject: Re: [ProfessorAmanda/econsimulations] show regression equation (PR #283)
Thanks! It does make sense.
I've also moved it to the bottom of the graph due to the length of the equation (it's probably not ideal to split one equation into two lines).
Please let me know if I didn't understand correctly!
Best, Wayne
— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FProfessorAmanda%2Feconsimulations%2Fpull%2F283%23issuecomment-1147871038&data=05%7C01%7Ctbyker%40middlebury.edu%7Ce0c36bec5d564087871208da47f8d15f%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901431251750148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mITxzdHJPWYgyvPdFGFS0%2FxhmDiRJuuBVE%2FjPwXg7nA%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP65VZ2FOKGUPKC7N7XABQTVNZLRDANCNFSM5YADMH4Q&data=05%7C01%7Ctbyker%40middlebury.edu%7Ce0c36bec5d564087871208da47f8d15f%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901431251750148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=w7p3i3B2SqFfkNjPTdW%2BUAoNI8KkbV9c7J1lA6M4Bww%3D&reserved=0. You are receiving this because your review was requested.Message ID: @.***>
Hi Professor Byker,
Sorry for the misinterpretation! I should have made sure I understood it correctly before attempting those modifications. Does this look right?
Best, Wayne
Great! And the corrected line should only appear once the user has clicked the "show corrected line" button.
Thanks!
Tanya
Tanya Byker
Associate Professor, Economics
Middlebury College @.**@.>
From: Wayne Wang @.> Sent: Monday, June 6, 2022 4:26 PM To: ProfessorAmanda/econsimulations @.> Cc: Byker, Tanya S. @.>; Review requested @.> Subject: Re: [ProfessorAmanda/econsimulations] show regression equation (PR #283)
Hi Professor Byker,
Sorry for the misinterpretation! I should have made sure I understood it correctly before attempting those modifications. Does this look right?
Best, Wayne
— Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FProfessorAmanda%2Feconsimulations%2Fpull%2F283%23issuecomment-1147886421&data=05%7C01%7Ctbyker%40middlebury.edu%7C6a655bfab7f242a7e79508da47fac8e3%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901439695985111%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tav139g8yVuZoj8Hg9hvLYchF4W7WoyVLbtQOsS49yg%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP65VZ22ITYLOD7MFFC5LXLVNZNF5ANCNFSM5YADMH4Q&data=05%7C01%7Ctbyker%40middlebury.edu%7C6a655bfab7f242a7e79508da47fac8e3%7Ca1bb0a191576421dbe93b3a7d4b6dcaa%7C1%7C0%7C637901439695985111%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1%2Bp%2BXKlfQCt2EXn%2B%2F9AvIpKLjLLmtbJwVb1vdXYI%2F6w%3D&reserved=0. You are receiving this because your review was requested.Message ID: @.***>
Resolves issue #280
[Feature] I've added the presentation of regression equation to the right of the chart. It adapts to the newest regression line when new examples are generated. The equation for Corrected Regression is shown / hidden in sync with the regression line on the chart.
[Questions]
Please let me know if there's any problem running the branch "OVBequations" locally, or any changes you would like me to make :)