# Inputing Temperatures

I am attempting to impute temperature based on elevation in ArcMap 10.2, using a regression equation. So far, I have been unsuccessful, as my output raster from my regression equation has the high too cool by 20 degrees, and the low too warm by 20 degrees.

I've attached my first output of the regression over the 30m DEM I've used I've also attached the scatter plot of temperature points vs. altitude, which I then make the regression equation from. The equation I got from using a second order polynomial regression is as follows: `-.00001*"DEM"^2+.0918*"DEM"`

My approach is that there will be a relationship between decreasing temperatures and an increasing altitude, and that I can make a regression equation off of this. • Just a note that it's not actually "interpolation". It's a form of imputation, but not interpolation. – Tom Jul 11 '16 at 16:50
• – user2856 Aug 12 '16 at 22:35

## 1 Answer

In a nutshell, the problem is with the loose-fit of the regression equation.

The 2nd-order equation describes a parabolic curve anchored (mid-span) at ~3200 ft elevation and crossing the zero, zero origin. Both of these observations point to a poorly curve-fitted dataset, since your temperatures appear well above zero near the beach.

Here is my suggestion: First find a mean temperature per elevation band (I suggest 100 ft elevation bands). Once each elevation band is approximated by a mean, then use regression all means across all elevations.

Notice that the R^2 fit is poor (large) where the samples are wide spread or sparse...so you may need to re-observe a lot more temperature readings in the higher elevations at equivalent conditions (i.e. mid-day, mid-month, mid-season...)

• I would also suggest adding additional variables to perhaps address factors that elevation alone doesn't account for. For example, say the data were for California. You might find a parabolic curve like this for temperature and elevation. However, elevation itself has a much more linear relationship with temperature; it's just that the maritime influence is quite dramatic. In such a case, I would recommend incorporating into the equation proximity (with a strong distance decay) to the ocean or other climatically-relevant bodies of water. – Tom Jul 11 '16 at 18:41
• Foliage Density might be another variable to include...if that information is available in your area-of-interest. – JasonInVegas Jul 13 '16 at 19:01