stata令相关系数加显著性

相关

皮尔逊相关加显著性

pwcorr a1 a2,sig star(0.01)

为避免多重比较谬误

(multiple comparison fallacy)
讲多重比较纳入考虑,
pwcorr y x1 x2 x3 x4,sidak sig star(.05)
#括号内显著性可自行调整为0.1, 0.05, 0.01

spearman 等级相关

spearman a1 a2

kendall cixuxiangguan

ktau a1 a2

协方差

correlation z1 z2 z3 z4,covariance

回归后键入一下命令估计系数之间的相关矩阵,诊断多元共线性

correlation, _coef covriance

若要显示系数的方差协方差矩阵

correlation,_coef covriance

散点图矩阵

graph z1 z2 z3 z4,half msymbol(+) maxis(ylabel(none) xlabel(none))

删除缺失值

!missing

做时滞或者提前

做时滞

gen n = _n
tsset n
gen lx = L.x
gen l2x = L2.x

做提前

gen n = _n
tsset n
gen fx = F.x
gen f2x = F2.x

你可能感兴趣的:(stata,statistics)