#include <oxstd.h>

main()
{
    /* a simple linear model */
    decl ct, mx, vbeta, veps, vy;
    ct = 4;
    mx = 1 ~ range(1, ct)';
    vbeta = <1;1>;
    veps = 0.1 * rann(ct, 1);
    vy = mx * vbeta + veps;
    print("y = X * beta + eps\n",
        "X", mx, "beta", vbeta, "eps", veps, "y", vy,
        "b_hat", (1/(mx'mx)) * (mx'vy) );
}
