df_scale_ols: Scales variables in data.frame dfx using ordinary least squares such

Description

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.

Usage

1
df_scale_ols(dfx, dfy)

Arguments

dfx

data.frame, Data frame to use as independent variable

dfy

data.frame, Data frames to use as dependent variable

Value

data.frame, A rescaled version of dfx with dimnames from dfy.

Examples

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)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.