搜索
查看: 201|回复: 0

StepReg:我的第一个R语言程序包

[复制链接]

2

主题

2

帖子

87

积分

注册会员

Rank: 2

积分
87
发表于 2018-10-11 17:23:39 | 显示全部楼层 |阅读模式
本帖最后由 2xia 于 2018-10-14 16:56 编辑

StepReg--Stepwise Regression Analysis
❗️ This is a read-only mirror of the CRAN R package repository.
1. Introduction
  • What is the stepwise regression?
      Stepwise regression is a method of fitting regression models in which the choice of predictive variables is carried out by an automatic  procedure.
  • What is the main features in SteReg?
      In this package, multiple dependent variables stepwise regression, continous effect nested within class effect and forced first n effects are considered. It computes power for three test statistics in multivariate stepwise regression analysis: Wilks’ lambda, Pillai-Bartlett trace, and Hotelling Lawley trace.
2. Statistical and coding details in this package
  • The main approaches:

    • Forward selection, which involves starting with no variables in the model, testing the addition of each variable using a chosen model fit criterion, adding the variable (if any) whose inclusion gives the most statistically significant improvement of the fit, and repeating this process until none improves the model to a statistically significant extent.

    • Backward elimination, which involves starting with all candidate variables, testing the deletion of each variable using a chosen model fit criterion, deleting the variable (if any) whose loss gives the most statistically insignificant deterioration of the model fit, and repeating this process until no further variables can be deleted without a statistically significant loss of fit.

    • Hybrid Approaches, a combination of the above, testing at each step for variables to be included or excluded.
  • Selection or Choose Criterion:

       AIC/AICc/BIC/HQ/HQc/SBC/Pvalue based on F test and Approximate F test (Wilks’ lambda, Pillai-Bartlett trace, and Hotelling Lawley trace).
  • Multicollinearity:
        Multicollinearity is a state of very high intercorrelations or inter-associations among the independent variables. The statistical inferences made about the data may not be reliable due to multicollinearity. In this package, multicollinearity is detected with tolerance and its reciprocal, called variance inflation factor (VIF).
  • Coding:
       The core part of the program is coded with R and Cpp.
3. Usage and Examples
Examples are listed with help of function stepwise()
[C++] 纯文本查看 复制代码
install.package("StepReg")
library(StepReg)
stepwise(data, y, notX, include, Class, selection, select, sle, sls, tolerance,Trace, Choose)

We welcome commits from researchers who wish to improve our software, and good luck to you.


github:
https://github.com/JunhuiLi1017/StepReg
CRAN:
https://cran.r-project.org/web/packages/StepReg/index.html
PDF:
https://cran.r-project.org/web/packages/StepReg/StepReg.pdf








上一篇:R for data science 笔记--数据清洁
下一篇:gtWAS:将基因组和转录组数据与表型数据联合关联分析的Rpackage
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|生信技能树    

GMT+8, 2018-12-12 03:06 , Processed in 0.084043 second(s), 30 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.