-
Login or Register
- Log in with
sysuse auto, clear timer on 1 frapply in 1/30 if price > 6000: keep price |> save hiprice1, replace timer off 1 sysuse auto, clear timer on 2 frame put price in 1/30 if price > 6000, into(hi) frame hi: save hiprice2, replace frame drop hi timer off 2 timer list
. timer list 1: 0.02 / 1 = 0.0230 2: 0.02 / 1 = 0.0160
import delimited using "xxx.csv", clear
import delimited using "xxx.csv", clear row???
rowrange([start][:end])
ssc install frapply sysuse auto, clear frapply in 1/30 if price > 6000: keep price |> save hiprice
sysuse auto qui reg price mpg i.foreign margins, dydx(*) matrix bmarg=r(b) matrix list bmarg
. sysuse auto (1978 automobile data) . qui reg price mpg i.foreign . margins, dydx(*) Average marginal effects Number of obs = 74 Model VCE: OLS Expression: Linear prediction, predict() dy/dx wrt: mpg 1.foreign ------------------------------------------------------------------------------ | Delta-method | dy/dx std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- mpg | -294.1955 55.69172 -5.28 0.000 -405.2417 -183.1494 | foreign | Foreign | 1767.292 700.158 2.52 0.014 371.2169 3163.368 ------------------------------------------------------------------------------ Note: dy/dx for factor levels is the discrete change from the base level. . matrix bmarg=r(b) . matrix list bmarg bmarg[1,3] 0b. 1. mpg foreign foreign y1 -294.19553 0 1767.2922
Leave a comment: