View source: R/getTogetherCovarData.r
getTogetherCovarData | R Documentation |
Put together available covariate data from both the external Environmental Covariate Database, as well as CAMP-collected environmental variables.
getTogetherCovarData(obs.eff.df, min.date, max.date, traps, enhmodel)
obs.eff.df |
A data frame with at least variables |
min.date |
The start date for data to include. This is a text string in
the format |
max.date |
The end date for data to include. Same format as
|
traps |
A set of traps for which efficiency data are available. |
enhmodel |
A logical indicating if function |
Function getTogetherCovarData
appends covariate information
for each unique batchDate
and TrapPositionID
combination
avaiable in data frame obs.eff.df
.
Environmental covariate data are queried from the WEST-supported database created for housing USGS and CDEC data at sites important to the CAMP program.
Other covariates derive directly from data stored within a particular
river's CAMP mdb database. Prior to use in efficiency models, data are
first converted to standardized units via the QryCleanEnvCov
SQL
query sequence in function getCAMPEnvCov
, which is called once
for each covariate.
Following querying, all covariates are then fit with a smoothing spline via
function estCovar
, with penalization parameter λ
selected via cross-validation. Smoothing occurs to ensure easy fitting of
efficiency models, whose temporal resolution is that of a batchDate
.
Several items, all housed within a list. The main piece of output is
data frame obs.eff.df
, which contains the same number of rows as the
obs.eff.df
submitted to the function, but with several additional
columns, due to appended covariates.
Same as submitted to the function, but with covariate columns added.
Available CAMP discharge data.
Available CAMP water-depth data.
Available CAMP air-temperature data.
Available CAMP turbidity data.
Available CAMP water-velocity data.
Available CAMP water-temperature data.
Available CAMP light-penetration discharge data.
Available Environmental Covariate Database discharge data.
Available Environemtnal Covariate Database water temperature data.
Hastie, T., Tibshirani, R., and Friedman, J. 2009. The Elements of Statistical Learning. 2nd Edition. Springer, New York, New York.
getCAMPEnvCov
, estCovar
## Not run: ans <- getTogetherCovarData(obs.eff.df, min.date, max.date, traps, enhmodel) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.