title: Precipitation to Mean Temperature Relationship
body: <p>Based on the data below, I am trying to see if there is any relationship between <code>Precipitation</code> and <code>Mean Temperature</code>. Now the <code>lm</code> plot shows <code>precipitation</code> to <code>increase</code> with <code>increasing</code> temperature. However, the <code>p-value</code> is greater than <code>0.05</code> which tells me that statistically this could be by <code>chance</code>.</p>
  <p>Is there any other method(s) which might be better suited to analyze such a relationship?</p>
  <p>Data (<code>df</code>):</p>
  <pre><code>structure(list(year = 1980:2021, AvgTMean = c(24.2700686838937, 
  23.8852956598276, 25.094446596092, 24.1561175050287, 24.157183605977, 
  24.3047482638362, 24.7899738481466, 24.5756232655603, 24.5833086228592, 
  24.7344695534483, 25.3094451071121, 25.2100615173707, 24.3651692293534, 
  24.5423890611494, 25.2492166633908, 24.7005097837931, 24.2491591827443, 
  25.0912281781322, 25.0779264303305, 24.403294248319, 24.4983991453592, 
  24.4292324356466, 24.8179824927011, 24.7243948463075, 24.5086534543966, 
  24.2818632071983, 24.4567195220259, 24.8402224356034, 24.6574465515086, 
  24.5440715673563, 23.482670620977, 24.9979594684914, 24.5452453980747, 
  24.9271462811494, 24.7443215819253, 25.8929839790805, 25.1801908261063, 
  25.2079308058908, 25.0722425561207, 25.4554644289799, 25.4548979078736, 
  25.0756772250287), year.1 = 1980:2021, AvgPpt = c(202.704111130864, 
  114.247733460745, 126.199474853408, 141.152117838805, 116.203497094368, 
  130.77896716476, 126.350886628546, 107.205512960324, 91.6244152459231, 
  72.3675977029335, 107.065495697931, 138.900189676504, 114.878379703938, 
  117.930669633136, 156.362504334285, 149.231959978739, 123.880574706985, 
  148.447735131721, 135.237081261339, 145.989968136124, 105.967135316339, 
  120.919120551475, 105.667550237949, 119.329320418424, 94.5035688452337, 
  134.475944917217, 100.046199758505, 112.607532853243, 117.968374857272, 
  146.639791754533, 132.227290150763, 117.147468204471, 145.947365902934, 
  112.396272586057, 125.093465198045, 113.700379223659, 125.374770243706, 
  163.60349436601, 130.849234933763, 155.373781692023, 224.255287296813, 
  127.831766140872)), class = &quot;data.frame&quot;, row.names = c(NA, -42L
  ))
  </code></pre>
  <p>Code:</p>
  <pre><code># Static regression plot
      df %&gt;% 
        ggplot(aes(x = AvgTMean, y = AvgPpt)) +
        geom_point(aes(color = &quot;Precipitation&quot;), size = 2, shape = 1, alpha = 0.5) +
        geom_smooth(method = lm, aes(linetype = &quot;LM&quot;), se = FALSE, color = &quot;red&quot;) +
        scale_linetype_manual(values = 2, name = NULL) +
        scale_colour_manual(values = &quot;deepskyblue4&quot;, name = &quot;Legend&quot;) +
        theme(text = element_text(size = 16)) +
        xlab(&quot;Temperature (\u00B0C)&quot;) +
        ylab(&quot;Precipitation (mm)&quot;) +
        ggtitle(&quot;Precipitation -  Temperature Relationship&quot;) +
        guides(color = guide_legend(override.aes = list(alpha = 0.5), order = 1))
  
  # LM Model 
  lm(AvgPpt ~ AvgTMean, data = df) -&gt; model_df
  get_formula(model_df)
  
  summary(model_df)
  </code></pre>