Description Usage Arguments Value Examples
Scales variables in data.frame dfx using ordinary least squares such that the scaled result explains as much of the variance in dfy as possible. Scaling is done separately for each variable (i.e. no linear mixing of variables). Assumes data.frames dfx and dfy to be of identical structure. Intended use: to scale up cocoreg projections to account for the lost variance.
1 | df_scale_ols(dfx, dfy)
|
dfx |
data.frame, Data frame to use as independent variable |
dfy |
data.frame, Data frames to use as dependent variable |
data.frame, A rescaled version of dfx with dimnames from dfy.
1 2 3 4 5 6 | ## Not run:
dc <- create_syn_data_toy()
ccr <- cocoreg(dc$data)
dfLst <- mapply(df_scale_ols, ccr$data, dc$data , SIMPLIFY=F)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.