Triad sou.

2011-10-01から1ヶ月間の記事一覧

任意の底の対数

SAS

proc fcmp outlib = sasuser.funcs.logbase; function logbase(x, base); return (log(x) / log(base)); endsub; run; options cmplib = sasuser.funcs; data test; a = logbase(48, 7); b = logbase(49, 7); proc print; run;OBS a b 1 1.98940 2

一般化線型モデルの復習

仮定 確率分布 確率変数 $Y_i$ が互いに独立に canonical form の指数型分布族、 \[ f_{Y_i}(y_i)=\exp\left\{ [y_i \theta_i - b(\theta_i)] / \phi^2 - c(y_i, \phi) \right\}, \] に従う事を仮定する ($Y_i \overset{\rm{i.i.d.}}{\sim} f_{Y_i}(y_i)$)。…

set end; データステップで最後のオブザベーションのみ出力する方法

SAS

これは覚えておくとお得かもしれません。 set data; by variable; if last.variable then output; の仲間ですね。 data sample; input x y z @@; cards; 1 2 3 4 5 6 7 8 9 ; data sample_final; retain xx xy xz yy yz zz 0; set sample end = final; xx = …