apca: Absolute Principal Component Analysis (APCA)

Description Usage Arguments Details Examples

View source: R/apca.R

Description

apca performs APCA on daily PM2.5 constituent concentrations

Usage

1
2
3
4
5
6
apca(x, ...)

## Default S3 method:
apca(data, tots = NULL, nsources = NULL, adjust = NULL,
  mdl = NULL, cut = 1, type = "apca", mons = NULL, i = NA,
  print = F, ...)

Arguments

data

data frame of daily constituent concentrations with date as first column

tots

vector of total concentrations (total PM2.5) for each day. If null, uses rowSums(data)

nsources

number of sources. If null, uses number of eigenvalues of the correlation matrix greater than one.

adjust

method to adjust censored concentrations below minimum detection limits (MDLs). If null, uses complete case data

mdl

either a vector of mdls corresponding to each constituent or a matrix of mdls corresponding to each constituent and each day.

cut

cutoff for eigenvalues. Only used if nsources is NULL

type

Source apportionment method (apca or mapca)

mons

vector of monitors corresponding to data

i

monitor number (for printing)

print

whether to print monitors without temporal variability

Details

This is a function to estimate PM2.5 source profiles and daily PM2.5 source concentrations from PM2.5 constituent concentrations observed at ambient monitors (e.g. EPA Chemical Speciation Network). Works on dataframe where the first column is date and all subsequent columns are concentrations of chemical constituents. See Thurston and Spengler (1985, Atmospheric Environment)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(nycdat)
data(nycmdl)
#fix data totals
pm <- nycdat$PM25
whPM <- which(colnames(nycdat) == "PM25")
nycdat <- nycdat[, -whPM]
whPM <- which(colnames(nycmdl) == "PM25")
nycmdl <- nycmdl[, -whPM]
apca(nycdat)
apca(nycdat, tots = pm)
apca(nycdat, mdl = nycmdl, adjust = "substitute")

kralljr/handles documentation built on Dec. 6, 2019, 3:39 p.m.