# How to use a regression equation to create a map in QGIS?

I have been working on creating an exposure map based on measures taken at fixed points. I want to extrapolate the results to a grid to get an exposure map (air pollution data) for a region based on map data (road length, bus stops, etc.)

I have done the statistical work and have a regression equation from the collected data, but I am having a problem with the next step.

How do I use the regression equation to create the exposures for unmeasured areas?

I created 100mx100m grid over the area but am wondering if there is a tool I can use to input the regression equation for each grid section and have QGIS create a map with the calculated values?

Or do I need to calculate the values somewhere else and use that to create a map?

• Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour which emphasizes that there should be only one question asked per question.
– PolyGeo
Commented Jun 2, 2019 at 3:53

Suppose your regression model is of type `Y = b0 + b1*X + e`.
1. Interpolate the explanatory variable (`X`) to the area of interest (AOI). This means to fill in the empty 100m X 100m grid. Which method/tool to pick up for this depends on the analysis.
2. Use tool raster calculator to create a new raster with values for the response variable `Y` in the AOI based on the `b0 + b1*X` part of the model.