frlr2: Fit Repeated Linear Regressions with Two Variables

Description Usage Arguments Value Author(s) References Examples

View source: R/RcppExports.R

Description

Fit a set of linear regressions which differ only in two variables.

Usage

1
frlr2(R_X, R_idx1, R_idx2, R_Y, R_COV)

Arguments

R_X

the observation matrix

R_idx1

the first identical feature

R_idx2

the second identical feature

R_Y

the response variable

R_COV

common variables

Value

the fitting results for each regression.

Author(s)

Lijun Wang

References

https://stats.hohoweiya.xyz//regression/2017/09/26/An-R-Package-Fit-Repeated-Linear-Regressions/

Examples

1
2
3
4
5
6
7
8
library(fRLR)
set.seed(123)
X = matrix(rnorm(50), 10, 5)
Y = rnorm(10)
COV = matrix(rnorm(40), 10, 4)
idx1 = c(1, 2, 3, 4, 1, 1, 1, 2, 2, 3)
idx2 = c(2, 3, 4, 5, 3, 4, 5, 4, 5, 5)
frlr2(t(X), idx1, idx2, Y, t(COV))

fRLR documentation built on Sept. 30, 2017, 1:04 a.m.