title: Why does our code give a map.polly error when calculating the beta?
body: <p>In order to calculate the beta of a mutual fund in a specific year. We are trying to run a regression on the excess return on the market compared to the (market rate - risk free rate). Our code is as follows:</p>
  <pre><code>Returns_Database &lt;- CRSP_Database %&gt;%
   select(Wficn, caldt, Excess_Return, mktrf)%&gt;%
    nest(data = c(&quot;Excess_Return&quot;, &quot;mktrf&quot;)) %&gt;%
    mutate(model = map(data, ~ lm(Excess_Return = , mktrf = ), data = .))) %&gt;%
  </code></pre>
  <p>How come we keep getting the map.polly error, or what are we missing?</p>