circulation_lm {LorMe} | R Documentation |
Circulation of fitting Linear Models
Description
Using circulation to fit linear models between one dependent variable and series of independent variable
Usage
circulation_lm(y, xframe, margin)
Arguments
y |
Dependent variable |
xframe |
Matrix or data frame of independent variable |
margin |
A vector of 1 or 2 indicates arrangement of xframe. 1:by rows 2:by columns |
Details
if row names(for margin 1) and column names(for margin 2) are not given, ID column of return data frame will be row/column numbers.
Value
Data frame contains lm statistics of all Independent Variable
Note
Other arguments used in function lm were set as default. See in lm
.
Author(s)
Wang Ningqi2434066068@qq.com
Examples
data(testotu)
###using margin 1, arrange by rows##
dep=testotu[1,2:21]
in_dep=testotu[-1,2:21]
lm_stat<-circulation_lm(y = dep,xframe = in_dep,margin = 1)
lm_stat
###using margin 2, arrange by column##
dep=testotu[,2]
in_dep=testotu[,3:21]
lm_stat<-circulation_lm(y = dep,xframe = in_dep,margin = 2)
lm_stat
[Package LorMe version 1.2.1 Index]