fitio {heR.MonitoringData}R Documentation

Fit a Model to Indoor-Outdoor Particle Data

Description

Fit a nonlinear material balance model to indoor-outdoor airborne particle time series data for a source-less residence, estimating total particle decay (ventilation+deposition) and penetration efficiency. Diagnostic plots for the fit are produced by default.

Usage

fitio(indoor, outdoor, delta, start, decf = 1,
      initial.indoor = indoor[1], plot = TRUE)

Arguments

indoor a vector of sequential indoor airborne particle concentrations
outdoor a vector of sequential outdoor airborne particle concentrations (measured concurrently with the indoor concentrations)
delta the time interval between indoor and outdoor observations
start a named list giving the starting values for pen (penetration efficiency) and decay (the overall particle decay rate including ventilation and deposition loss), defaults to list(pen=1, decay=1); the particle penetration efficiency should be between 0 (no penetration) and 1 (complete penetration); particle decay is in units of inverse hours [1/h].
decf the decay factor, defaults to 1, i.e., the deposition rate is equal to "1" times the ventilation rate.
initial.indoor the initial predicted indoor concentration, defaults to the initial observed indoor concentration
plot logical, whether to produce diagnostic plots or not, defaults to TRUE

Details

This function provides a way to simultaneously estimate the outdoor particle penetration efficiency and decay for a residence based on an assumption about the relationship between ventilation and deposition loss rates. It is a wrapper for the stock R nls function for least-squares nonlinear regression, minimizing the sum of squared differences between the observed indoor concentration and that predicted by a material balance model (derived from conservation of airborne particle mass; see below).

The procedure assumes normal, independent errors with constant variance. See the reference in the nls documentation for more information.

The model is a recursive solution of the following material balance for particles infiltrating from outdoor air into a residence containing no internal particle sources:

(d(Cin)/dt) = p*A*Cout - A*Cin - K*Cin

where Cin is the indoor airborne particle concentration, Cout is the outdoor airborne particle concentration, p is the penetration efficiency, A is the ventilation rate (for both delivering and removing particle mass), and K is the deposition rate for loss onto indoor surfaces. Penetration efficiency specifies what fraction of the incoming particle mass is filtered out by the building shell. We do not need a similar factor for leaving particle mass because any filtering in this direction will not affect the indoor concentration.

Assuming that the outdoor concention, Cout, is constant during a given time step, the solution has the form:

Cin[i] = p*(A/(A+K))*Cout[i]*(1-r) + r*Cin[i-1]

where r = exp(-(A+K)*DELTA), DELTA is the time interval, and i is the time index.

Setting DECAY = A+K and K=DECF*A, where DECF, the decay factor, is a positive number usually between 0 and 1, we have

Cin[i] = (p/(1+DECF))*Cout[i]*(1-r) + r*Cin[i-1]

r = exp(-DECAY*DELTA)

The regression cannot distinguish between deposition and ventilation when they are both specified in the model (giving a singular gradient error), so we must estimate the combined decay, deposition plus ventilation, and specify how deposition and ventilation are related (via DECF).

Important Note: The indoor-outdoor model assumes that there are no particle sources indoors, i.e., all particles originate from outdoor air. If the data do reflect active indoor sources, or if the air exchange rate is very high, then the penetration efficiency may extend above 1 (a non-physical result with respect to the above indoor-outdoor model).

Value

An nls fitted model object, specifying the final parameter estimates. Diagnostic plots may be created as a by-product.

Note

There is likely to be some serial dependence (autocorrelation) in the residuals and, perhaps, non-constant variance. This situation is at odds with the regression assumptions and may be dealt with in a future version of this or another function (e.g., by fitting an autoregressive function to the residuals, including weights in the model, or transforming the response). One can assess the severity of nonconformance from the diagnostic plots that are produced by default.

It is also desirable for a future version of this function to constrain the penetration efficiency to between 0 and 1 (the physically interpretable range).

Author(s)

Neil Klepeis

See Also

nls

Examples

data(paul)
attach(paul)
fitio(indoor=IndoorPAH.ng.m3, outdoor=Outdoor.PAH.ng.m3, delta=0.016667)

[Package heR.MonitoringData version 0.0.2 Index]