Description Usage Arguments Details Value
Function to calculate linear regressions between time series in Y as function of time series in X.
1 | calcLRs.YsByXs(mdfrX, mdfrY, verbose = FALSE)
|
mdfrX |
- melted dataframe with independent (X) time series |
mdfrY |
- melted dataframe with dependent (Y) time series |
verbose |
- flag to print messages |
Requires packages 'plyr', 'reshape2', and 'glmulti'. Datasets are standardized as z-scores, so the constant term in the linear model is dropped.
none.
list with named elements 'res', 'summary' and 'plot':
res - a list with sublists by unique YG:YV:XG:XV with elements
lms - list with linear model (lm) results by Y for X
summary - dataframe with summaries of linear model results
summary - a dataframe summarizing all LR results. Columns are
ygroup - dependent variable group label
y - dependent variable label
xgroup - independent variable group label
x - independent variable label
n - number of valid data points
rho - Pearson's correlation coefficient
rsq - R^2 for linear fit
adj.rsq - adjusted R^2 for linear fit
F - F statistic
prF - Pr(>F) (p-value uncorrected for multiple comparisons)
aicc - AICc value
del.aicc - AICc relative to null model [i.e., AICc(model) - AICc(null)]
data - dataframe with data involved in linear models
ygroup - dependent variable group label
yvar - dependent variable label
xgroup - independent variable group label
xvar - independent variable label
year - year
x - independent value in LR
y - dependent value in LR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.