Good morning everyone,
I have been asked to try to visualize a first step regression. Anyway, in order to do this, my datas must be grouped in a certain way with the following command:
sum l_ln_km_IH
gen l_ln_km_IH_0 = ‘r(min)’
forvalues i = 10(10)90 {
egen l_ln_km_IH_‘i’ = pctile(l_ln_km_IH), p(‘i’)
}
gen cat_l_ln_km_IH_temp = 0
local k = 1
forvalues i = 10(10)90 {
replace cat_l_ln_km_IH_temp = ‘k’ if l_ln_km_IH > l_ln_km_IH_‘i’
local k = 1 + ‘k’
}
bysort cat_l_ln_km_IH_temp : egen cat_l_ln_km_IH = mean(l_ln_km_IH)
drop cat_l_ln_km_IH_temp
Anyway, this command does not work. I have problems on the options (i) on pctile and on r(min). I have already tried to not add the ' ', but it does not change anything.
Morever, I don't understand how this command groupes the datas, in other words, I do not understand the logic behind this command.
Can someone help me?
Thank you
Related Posts with First step regression
Interaction terms for two dummiesHi I have a question about the interaction term for two dummies (In fact, my question is little bit …
Generating dependent variables for country pairsHello,
I am doing a paper on the European financial crisis and cross-border M&As. In the paper …
Hausman TestHello,
I am performing a hausman test to test if i should perform a fixed or a random effects regre…
Rolling Window Regression CAPMHello Together I would like to do a rolling window regression (i.e. explain the returns of the funds…
Interaction terms giving error "factor variables may not contain noninteger values"Hi,
I have data of rainfall for each state and year, and I am explaining it based on the size of th…
Subscribe to:
Post Comments (Atom)
0 Response to First step regression
Post a Comment