OrderByR2 | R Documentation |
Calculates R2 of a linear model of the formula var
~ dateNm
for
each var
of class nmrcl
and returns a vector of
variable names ordered by highest R2. The linear model can be calculated over
a subset of dates, see details of parameter buildTm
. Non-numerical
variables are returned in alphabetical order after the sorted numerical
variables.
OrderByR2(dataFl, dateNm, buildTm = NULL, weightNm = NULL,
kSample = 50000)
dataFl |
A |
dateNm |
Name of column containing the date variable. |
buildTm |
Vector identify time period for ranking/anomaly detection (most likely model build period). Allows for a subset of plotting time period to be used for anomaly detection.
|
weightNm |
Name of the variable containing row weights, or |
kSample |
Either |
A vector of variable names sorted by R2 of lm
of the formula
var
~ dateNm
(highest R2 to lowest)
Copyright 2017 Capital One Services, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Functions depend on this function:
vlm
.
This function depends on:
CalcR2
,
PrepData
.
data(bankData)
bankData <- PrepData(bankData, dateNm = "date", dateGp = "months",
dateGpBp = "quarters")
OrderByR2(bankData, dateNm = "date")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.