⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stepwise.sas

📁 SAS for Windows统计分析系统教程,里面有源码
💻 SAS
字号:
data stepwise;
  input hemogl Ca Mg Fe Mn Cu;
cards;
13.50    54.89    30.86    448.70    0.012    1.010
13.00    72.49    42.61    467.30    0.008    1.640
13.75    53.81    52.86    425.61    0.004    1.220
14.00    64.74    39.18    469.80    0.005    1.220
14.25    58.80    37.67    456.55    0.012    1.010
12.75    43.67    26.18    395.78    0.001    0.594
12.50    54.89    30.86    448.70    0.012    1.010
12.25    86.12    43.79    440.13    0.017    1.770
12.00    60.35    38.20    394.40    0.001    1.140
11.75    54.04    34.23    405.60    0.008    1.300
11.50    61.23    37.35    446.00    0.022    1.380
11.25    60.17    33.67    383.20    0.001    0.914
11.00    69.69    40.01    416.70    0.012    1.350
10.75    72.28    40.12    430.80    0.000    1.200
10.50    55.13    33.02    445.80    0.012    0.918
10.25    70.08    36.81    409.80    0.012    1.190
10.00    63.05    35.07    384.10    0.000    0.853
 9.75    48.75    30.53    342.90    0.018    0.924
 9.50    52.28    27.14    326.29    0.004    0.817
 9.25    52.21    36.18    388.54    0.024    1.020
 9.00    49.71    25.43    331.10    0.012    0.897
 8.75    61.02    29.27    258.94    0.016    1.190
 8.50    53.68    28.79    292.80    0.048    1.320
 8.25    50.22    29.17    292.60    0.006    1.040
 8.00    65.34    29.99    312.80    0.006    1.030
 7.80    56.39    29.29    283.00    0.016    1.350
 7.50    66.12    31.93    344.20    0.000    0.689
 7.25    73.89    32.94    312.50    0.064    1.150
 7.00    47.31    28.55    294.70    0.005    0.838
;
proc reg;
title'1. Forward Selection';
  model hemogl=ca mg fe mn cu/selection=forward;
run;
title'2. Backward Elimination';
  model hemogl=ca mg fe mn cu/selection=backward;
run;
title'3. Stepwise Regression';
  model hemogl=ca mg fe mn cu/selection=stepwise;
run;
title'4. Maximum R-square Improvement';
  model hemogl=ca mg fe mn cu/selection=maxr;
run;
title'5. Minimum R-square Improvement';
  model hemogl=ca mg fe mn cu/selection=minr;
run;
title'6. Rsquare method';
  model hemogl=ca mg fe mn cu/selection=rsquare;
run;
title'7.Adjusted R-square method';
  model hemogl=ca mg fe mn cu/selection=adjrsq;
run;
title'8. Cp method';
  model hemogl=ca mg fe mn cu/selection=cp;
run;
title'9. Multivariate Regression';
 model hemogl fe=ca mg mn cu/selection=none;
run;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -