PLSK.full: Function for Running a Full Model

Description Usage Arguments Details Value Modeling Object PLS Parms To Do List

View source: R/PLSK_full.r

Description

Function for running a full model.

Usage

1
2
PLSK.full(rawdata, desc.vars, pls.comps, UK.varnames = NULL, factr = 1e+09,
  verbose = FALSE, regional = TRUE)

Arguments

rawdata

A data.frame of the rawdata. See rawdata section for details. Failing to supply rawdata will terminate the function call.

desc.vars

A vector of ?

pls.comps

An integer between 1 and 5 indicating the number of PLS components.

UK.varnames

Defaults to NULL. This will?

factr

Defaults to 1e9.

verbose

Defaults to FALSE. This will?

regional

Defaults to TRUE. This will?

Details

This is one of the workhorse functions of this package. By default, distance variables are log-transformed. Geographic variables are screened for sufficient variability, etc. and other stuff I'll specify later. The function is expecting something like the following to be in the rawdata object:

Location-specifying columns

location_id, native_id, latitude, longitude, monitor_type, lambert_x, lambert_y, state_plane, state, county

Pollution concentrations

pollutant_conc

Value

A list containing a lot of stuff?

ini.l.pars

Vector of ?. NOTE: this is hard-coded, can it be removed from the output?

region.vec

List of vector of named strings, indicating which monitors are in which regions

b.region.vec

List of vector of named strings, indicating which monitors are in which regions

v.type

Character indicating variogram type. Options include "reg" for regional, or "nat" for national.

b.type

Character indicating beta type. Options include "reg" for regional, or "nat" for national.

v.hash

List of 2 objects: reg:function and nat:function. These are functions that have something to do with the variogram.

b.hash

List of 2 objects: reg:function and nat:function. These are functions that have something to do with the betas.

model.obj

List of 13. The modeling object, generated by make_modeling_object

exclude.vars

List of string vector listing covariates

all.vars

List of string vector listing covariates

miss

List of Boolean vector indicating ?

year

List of integer indicating year of model

pollutant

List of string indicating pollutant

invars

List of string vector, listing all variables passed to modeling process. NOTE since this is just rownames(rawdata), can it be removed?

rawdata

List of data.frame inluding all original data

desc.vars

List of string vector, listing ?

pls.comps

List of integer indicating number of PLS components

UK.varnames

Stuff

factr

List of ?

verbose

List of boolean; indicates?

regional

List of boolean; if true then regional, if false then single region

Modeling Object

The modeling object (model.obj) is a list of 13

y

Vector of named numbers (concentrations, I assume)

UK.covars

Stuff

covars.pls

A matrix of something ?

PLS

List of 19

obs

An integer indicating the number of observations (I think)

coords

A data.frame with x and y coordinates (lambert projection)

gps

A data.frame with lat and long coordinates

monitors

String vector listing monitors

weco.monitors

String vector listing monitors in the weco region

east.monitors

String vector listing monitors in the east region

west.monitors

String vector listing monitors in the west region

X

A matrix with rows equal to the number of monitors and columns?

parms

List of 5, generated from my.likfit

PLS

The PLS object is a list of 19. In general below, m is the number of monitors.

coefficients

List of 3-dimensional matrix (number of... monitors plus 32?, y, and 5 components?)

scores

Matrix that is... monitors by 5 components

loadings

Matrix that is number of monitors plus 32 by 5

loading.weights

a similar matrix?

Yscores

Matrix that is number of m x 5

Yloadings

Matrix 1 x 5 that?

projection

366 by 5 matrix

Xmeans

numeric vector

Ymeans

Number indicating?

fitted.values

334 by 5 matrix

residuals

34x1x5 matrix

Xvar

Vector of 5 named numbers

Xtotvar

Number indicating?

fit.time

Named number indicating?

ncomp

Integer.... 5

method

"kernelpls"

call

language plsr(formula = y ~ covars.pls, ncomp = pls.comps, data = model.obj, validation = "none")

terms

Classes 'terms', 'formula' length 3 y ~ covars.pls

model

data frame of y and covars.pls, which is 334 by 366?

Parms

The parms object is a list of 5, and is generated by my.likfit. In general below, m is the number of monitors.

log.cov.pars

List of vector of named numbers; includes tau, sigma and rho for each region (variogram parms?)

beta

Matrix (instead of vector?) intercept and betas (b1 and b2?) for each region

max.log.lik

A list of a number

hess.pd

A list of a boolean indicating whether the hessian was positive definite (?)

hessian

A matrix (9x9) which is the Hessian.

To Do List

I'm adding this section as a place to track things we might want to do as improvements


myoung3/regionalkrig documentation built on May 23, 2019, noon