mcmcsa: MCMC for source apportionment

Description Usage Arguments Details Examples

Description

mcmcsa performs MCMC for source apportionment

Usage

1
2
3
4
5
mcmcsa(x, ...)

## Default S3 method:
mcmcsa(dat, lamcon, mdls = NULL, guessvec = NULL,
  burnin = 10000, N = 1e+05, fix = NULL)

Arguments

dat

data frame of daily constituent concentrations with date as first column

lamcon

Matrix of sources by constituents with 1 and 0 for conditions

mdls

data frame of daily MDL values of the same dimensions of data

guessvec

starting values (do not need to provide)

burnin

number of burnin samples

N

number of samples

L

number of sources

Details

This function aims to draw from the posterior distributions of the source profiles, the source contributions/concentrations, the variance of the data and the other parameters. Eventually, this function will incorporate options for concentrations observed below the MDL

Examples

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

mcmcsa(nycdat, L, lamcon)

kralljr/MCMCsa documentation built on May 20, 2019, 1:13 p.m.