# NOT RUN {
set.seed(13)
dfr = data.frame(y = rnorm(20), x = rnorm(20))
grmod("ols y 0 x --simple-print",dfr)
grmod("ols diff(LRY) 0 diff(LRM)","denmark.gdt")
# }
# NOT RUN {
## command block example
# unrestricted linear regression
tp <- "ols diff(LRY) 0 diff(LRM) IBO -q"
# restrict block code:
md <-
"restrict --full
b[2] + b[3] = 0.3
end restrict"
# estimation
mod1 <- grmod(md,"denmark.gdt",top=tp)
names(mod1)
## prelimanary data manipulation example
pr <-
"list DEMOG = age educ female black married
list INCOME = finc25 finc35 finc50 finc75 finc100 finc101"
# estimate ordered probit
grmod("probit pctstck choice DEMOG INCOME wealth89 prftshr",
"pension.gdt",top=pr,type="ordered")
# }
Run the code above in your browser using DataLab