Hi guys, I'm trying to replicate a paper but could not understand the meaning of the following commands. I tried googling it but still, the meaning is not clear to me.
foreach x in N_baseline {
qui gen `x'_T1=`x' if vote==1
qui gen `x'_T2=`x' if vote==0
foreach k in T1 T2 {
egen m_`k'=mean(`x'_`k')
local m_`k' = m_`k'
egen sd_`k'=sd(`x'_`k')
local sd_`k'= sd_`k'
}
quietly reg `x' vote, r
quietly test vote = 0
gen p_1= r(p)
local p_1 = p_1
Related Posts with Difference between quietly gen, quietly test and quietly regress?
Create a new variable based on a date string variable yyyy-mm-dd and a numeric variable (yyyymmdd)Hi! I am very new to STATA. I have seen you answer different questions regarding date-variables. Ho…
time series regressions for a portfolioDear all For a project we have to use performance regression to estimate whether a portfolio delive…
MFX table logit commandHi all, I'm fairly new to Stata since I need it to write my bachelor thesis. However I'm stuck... I…
Setting version, seed, and sortseed not sufficient for reproducibility?The following code appears to produce different results depending on the Stata 16.1 edition I use. …
Problems creating a single variable that represents the different conditions of my experimentHi all, For my Master thesis, I used Qualtrics for an online experiment and within this experiment …
Subscribe to:
Post Comments (Atom)
0 Response to Difference between quietly gen, quietly test and quietly regress?
Post a Comment