?? logit_dgp.ox
字號:
// This returns data that follow a logit model with the
// supplied parameters. n is the number of observations.
// Note how the binary 0/1 variable is generated so that
// it really follows the logit model
logit_dgp(const n, const theta)
{
decl k, x, y;
k = sizer(theta); //sizer returns the number of rows of theta
x = ones(n,1) ~ rann(n,k-1);
y = (1 ./ (1 + exp(-x*theta)) .> ranu(n,1));
return y ~ x;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -