{"id":7125,"date":"2023-03-02T21:49:04","date_gmt":"2023-03-02T21:49:04","guid":{"rendered":"https:\/\/www.goodacademic.com\/blog\/questions\/r-programming\/"},"modified":"2023-03-02T21:49:04","modified_gmt":"2023-03-02T21:49:04","slug":"r-programming","status":"publish","type":"questions","link":"https:\/\/www.goodacademic.com\/blog\/questions\/r-programming\/","title":{"rendered":"R programming"},"content":{"rendered":"<div class=\"col-sm-12 messageContent\">\n <b>Learning Goal: <\/b>I&#8217;m working on a r question and need the explanation and answer to help me learn.<\/p>\n<p>1. Based on Lab3a exercises, select three most significant factors from single variable regressions, and run a regression of returns on these three variables.<\/p>\n<p>Discuss the joint significance of these variables.<\/p>\n<p>2. Based on Lab3b exercises, one can study the regression output and determine the significance of each factor. The following questions might help you in analyzing the regression output:<\/p>\n<p>(a) Is marketcap significant? Can you explain the sign of the coefficient?<\/p>\n<p>(b) Is price2cashflow significant? Can you explain the sign of the coefficient?<\/p>\n<p>(c) Is price2earnings significant? Can you explain the sign of the coefficient?<\/p>\n<p>(d) Is momentum significant? Can you explain the sign of the coefficient?<\/p>\n<p>3. From the Lab3b data set, one can include a few additional factor exposures. For example, one might decide to include price2dividend instead of price2earnings, or roe instead of price2cashflow.<\/p>\n<p>Estimate the fundamental factor model with log size, momentum, log price-to-book ratio based on fixed effects model with a. time fixed effects and b. time and firm fixed effects. Compare the estimates with the one we obtained above.<\/p>\n<p>Note:<\/p>\n<p># required library for running the function of felm() to fit a linear model with multiple group fixed effects<\/p>\n<p><em>install.packages(&#8220;lfe&#8221;)<\/em><\/p>\n<p><em>library(lfe)<\/em><\/p>\n<p>4. Why might univariate factor tests not be sufficient to determine the factors in a fundamental model?<\/p>\n<p>Write the homework in a word file and attach the code.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Learning Goal: I&#8217;m working on a r question and need the explanation and answer to help me learn. 1. Based on Lab3a exercises, select three most significant factors from single variable regressions, and run a regression of returns on these three variables. Discuss the joint significance of these variables. 2. Based on Lab3b exercises, one [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"disciplines":[662],"paper_types":[],"tagged":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/7125"}],"collection":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions"}],"about":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/types\/questions"}],"author":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/comments?post=7125"}],"version-history":[{"count":0,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/7125\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/media?parent=7125"}],"wp:term":[{"taxonomy":"disciplines","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/disciplines?post=7125"},{"taxonomy":"paper_types","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/paper_types?post=7125"},{"taxonomy":"tagged","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/tagged?post=7125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}