Statistics 506, Fall 2016

Midterm


Midterm with solutions

Solutions to problem 7:

Part a:

foreach x of varlist x10-x30 {
    count if `x' < 0
}

Part b:

foreach x of varlist x10-x30 {
    sum `x', meanonly
    local m=r(mean)
    count if `x' < `m'
}