Hello, I am running correlations over hundreds of variables and storing the output of the correlation coefficients, the variable names, number of observations and the confidence interval into Excel.
Due to the number of correlations I'm running, I am wondering whether there is a quicker way for my computer to run the task. This is my current code:
quietly{
putexcel set coef3, modify
local i=0
foreach var of varlist ea_* {
foreach var2 of varlist wdi_* {
local i=`i'+1
esize unp `var'==`var2', pbcorr
return list
putexcel A`i'=`r(r_pb)' B`i'=`r(lb_r_pb)' C`i'=`r(ub_r_pb)' D`i'=`r(N_1)' E`i'="`var'" F`i'="`var2'", nformat(excelnfmt)
}
}
}
Thank you and happy holidays
Related Posts with Quicker way to export correlation coefficients into Excel?
Adjusting for correlations in regressionHi everyone, I ran two economics experiments and I am having trouble making the correct inference. …
Collect Prefix Command and Ttest resultsHi all, In Stata 17 I've been trying to work with the collect command to produce some Latex tables!…
Generate primary, secondary, tertiary employer each month in panel dataHi everybody I am working with panel data to test how employees are affected when they are insource…
Tracking changes in population by geography over timeHello, In my dataset I have a number of small geographical areas (beginning with A in the sample da…
L'option Orthogonal dans le GMM en système two-stepJ'évalue l'effet de la qualité des institutions (DIM_POL) sur le développement financier (DFI). Pour…
Subscribe to:
Post Comments (Atom)
0 Response to Quicker way to export correlation coefficients into Excel?
Post a Comment