# How May Building Morphology Influence Pedestrians' Exposure to PM2.5?
## 2 Materials and Methods
### Modeling  
The data collected in the study formed spatial panel data because it consisted of the same set of locations observed multiple times (\(n=9\)). The study included time-varying variables to explain temporal variations in the PM2.5 observations. Location-specific variables, such as building morphological characteristics, would not change over time, and they would have fixed effects on the response variable. Therefore, the study built a fixed-effects panel model to assess the effect of time-varying variables on PM2.5 and extract the individual or location-specific fixed effects of time-invariant variables. Figure 6: Buildings’ morphological characteristics along data collection paths: (**a**) 50 m segments along data collection paths, segment centroids, and a 100 m buffer surrounding each segment with blue buffers of road segments along each collection path. As the buffers of road segments overlap, a single segment and its buffer boundary are highlighted in red for illustration. Buildings’ morphological characteristics for each segment are computed considering a surrounding 100 m buffer area and are displayed in (**b–f**) using segment centroids: (**b**) mean building area (meters), (**c**) the number of buildings per 1000 m\({}^{2}\) (**d**) mean building height (meters), (**e**) an average distance between nearest-neighbor building (meters), and (**f**) building coverage ratio. The equation for the fixed-effects panel model can be expressed as follows:  
\[Y_{it}=\alpha_{i}+\beta\times X_{it}+e_{it} \tag{1}\]  
where \({}_{i}\) refers to a fixed location; \({}_{t}\) refers to the time at which an observation was collected; \(Y_{it}\) is an observed PM2.5 at location \({}_{i}\) and time \({}_{t}\); \(X_{it}\) is a k \(\times\) 1 vector where k is the number of dependent variables specified in Equation (3); \(\beta\) is a 1 \(\times\) k vector of parameters; \(e_{it}\) is the error term. Intercept \(\alpha_{i}\) represents a fixed effect that is time-invariant but varied across locations. Following fixed-effects models, the study estimated coefficient \(\beta\) by \"de-meaning\", which removed the average over time from each observation:  
\[\left(Y_{it}-\overline{Y_{i}}\right)=\left(\alpha_{i}-\overline{\alpha_{i}} \right)+\beta\times\left(X_{it}-\overline{X_{i}}\right)+\left(e_{it}- \overline{e_{i}}\right) \tag{2}\]  
where \(\overline{Y_{i}}=\frac{1}{\Gamma}\sum_{t=1}^{T}Y_{it}\), \(\overline{X_{i}}=\frac{1}{\Gamma}\sum_{t=1}^{T}X_{it}\), and \(\overline{e_{i}}=\frac{1}{\Gamma}\sum_{t=1}^{T}e_{it}\). The variables with bars (i.e., (\(\overline{Y_{i}}\), \(\overline{\alpha_{i}}\),...) represent temporal means. De-meaning removes the fixed effect \(\alpha_{i}\) since a constant equates its mean over time (\(\overline{\alpha_{i}}\)). Thus, only time-varying effects remain in the equation. The study was subjected to the drawback of the fixed-effects model that the model could not include individual time-invariant covariates in the model because de-meaning the estimated \(\alpha_{i}\) (i.e., the sum of all fixed effects) effectively removed the time-invariant observations. Specifically, this study used the fixed-effects model to assess the effect of weather-related variables and the openness in the direction of wind on PM2.5. Although openness in the wind direction was not a time-varying variable, this variable might not exhibit a full time-invariant nature since its value changed according to the wind direction. Wind direction was a circular variable; therefore, it was used in the form of sine and cosine components in the model to account for its cyclical nature. Another wind-related variable resulted from the interaction of wind direction and the inlet of the DR1000 instrument. When the wind blew into the instrument's inlet, DR1000 recorded an elevated PM2.5 compared to the situation when the wind blew away from the inlet. Therefore, in addition to weather-related variables and directional viewshed, this fixed-effects model included the angle between the instrument travel direction and wind direction.