【问题标题】:Doing Principal Components in SAS Using a Holdout and to Score New Data使用 Holdout 在 SAS 中做主成分并对新数据进行评分
【发布时间】:2019-06-17 18:14:37
【问题描述】:

我正在 SAS Enterprise Guide 中执行主成分分析,并希望计算某些坚持的因素/成分分数。

KeepCombinedLR 是我的主要事实来源。我有另一个数据集,具有完全相同的变量,我希望在不将其包含在实际因子分析中的情况下对其进行评分。

proc factor data = KeepCombinedLR
simple
method = prin
priors = one
rotate = varimax reorder
mineigen = 1
nfactors = 25
out = FactorScores;
var var1--var40;
run;

【问题讨论】:

    标签: sas proc enterprise-guide


    【解决方案1】:
    data Fitness;
       input Age Weight Oxygen RunTime RestPulse RunPulse @@;
       datalines;
    44 89.47  44.609 11.37 62 178     40 75.07  45.313 10.07 62 185
    44 85.84  54.297  8.65 45 156     42 68.15  59.571  8.17 40 166
    38 89.02  49.874  9.22 55 178     47 77.45  44.811 11.63 58 176
    40 75.98  45.681 11.95 70 176     43 81.19  49.091 10.85 64 162
    44 81.42  39.442 13.08 63 174     38 81.87  60.055  8.63 48 170
    44 73.03  50.541 10.13 45 168     45 87.66  37.388 14.03 56 186
    ;
    proc factor data=Fitness outstat=FactOut
                method=prin rotate=varimax score;
       var Age Weight RunTime RunPulse RestPulse;
       title 'Factor Scoring Example';
    run;
    proc print data=FactOut;
       title2 'Data Set from PROC FACTOR';
    run;
    proc score data=Fitness score=FactOut out=FScore;
       var Age Weight RunTime RunPulse RestPulse;
    run;
    proc print data=FScore;
       title2 'Data Set from PROC SCORE';
    run;
    

    PROC SCORE 将使用您的“保留”数据集为您的数据评分。

    https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_score_examples01.htm&docsetVersion=14.3&locale=en

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-02
      • 2014-06-10
      • 1970-01-01
      • 2012-11-10
      • 2022-07-06
      • 1970-01-01
      • 1970-01-01
      • 2018-09-05
      相关资源
      最近更新 更多