Statistic STATA
Apa itu Menu "Statistics" pada STATA?
Statistics adalah menu inti STATA, tempat hampir semua analisis statistik dan ekonometrika dijalankan: statistik ringkas, uji hipotesis, regresi, data panel, time series, survival, SEM, dan lain-lain. Menu ini setara dengan menu Quick, View, dan Proc pada EViews digabung menjadi satu.
Sub-Menu dalam Menu Statistics
1. Summaries, Tables, and Tests
- Summary and descriptive statistics: Summary statistics (
summarize), Means (mean), Proportions (proportion), Ratios, Totals, Correlations and covariances (correlate), Pairwise correlations (pwcorr), Centiles (centile). - Tables: One-way tables (
tabulate oneway), Two-way tables (tabulate twoway, dengan uji Chi-square dan Fisher), Multi-way tables, Table of summary statistics (tabstat), Flexible table builder (table). - Classical tests of hypotheses:
- One-sample mean-comparison (
ttest). - Two-sample mean-comparison (
ttest, by()). - Two-group variance comparison (
sdtest). - Proportion tests (
prtest). - Nonparametric tests of hypotheses: Wilcoxon signed-rank, Wilcoxon rank-sum (Mann-Whitney), Kruskal-Wallis, Kolmogorov-Smirnov, Sign test.
- Normality tests: Skewness and kurtosis test (
sktest), Shapiro-Wilk (swilk), Shapiro-Francia.
- One-sample mean-comparison (
- Power and sample-size analysis (
power): menghitung ukuran sampel atau daya uji.
2. Linear Models and Related
- Linear regression (
regress): OLS standar. - Regression with robust standard errors (
regress, robust) dan clustered standard errors (vce(cluster id)). - Constrained linear regression (
cnsreg). - Censored and truncated models: Tobit (
tobit), Truncated regression (truncreg), Interval regression (intreg). - Quantile regression (
qreg), Median regression, Bootstrapped quantile regression. - Instrumental-variables regression (
ivregress 2sls/gmm/liml): variabel instrumen. - Three-stage least squares (
reg3), Seemingly unrelated regression (sureg). - Truncated regression, Heteroskedastic linear regression (
hetregress). - ANOVA/MANOVA: Analysis of variance and covariance (
anova), One-way ANOVA (oneway), Multivariate ANOVA (manova). - Postestimation untuk regresi linier (lihat poin 14).
3. Binary Outcomes
- Logistic regression (
logit,logistic) dan Probit regression (probit). - Complementary log-log (
cloglog). - Bivariate probit (
biprobit). - Heteroskedastic probit (
hetprobit). - Postestimation: marginal effects (
margins, dydx(*)), odds ratio, classification table (estat classification), Hosmer-Lemeshow (estat gof), dan ROC (lroc).
4. Ordinal Outcomes
Ordered logistic regression (ologit), Ordered probit (oprobit), Rank-ordered logistic (rologit).
5. Categorical Outcomes
Multinomial logistic regression (mlogit), Multinomial probit (mprobit), Conditional (fixed-effects) logistic (clogit), Alternative-specific models (asclogit, asmprobit).
6. Count Outcomes
Poisson regression (poisson), Negative binomial regression (nbreg), Zero-inflated models (zip, zinb), Zero-truncated models (ztp, ztnb), Generalized negative binomial.
7. Fractional Outcomes
Fractional response (fracreg) dan Beta regression (betareg) untuk variabel antara 0 dan 1.
8. Generalized Linear Models (GLM)
GLM (glm) dengan pilihan keluarga distribusi (Gaussian, binomial, Poisson, gamma, inverse Gaussian) dan fungsi penghubung (link).
9. Choice Models
Conditional logit (cmclogit), Mixed logit (cmmixlogit), Nested logit (nlogit) dan Multinomial probit (cmmprobit) untuk data pilihan diskrit (cm commands pada versi 16 ke atas).
10. Longitudinal/Panel Data (menu yang sering dipakai pada penelitian ekonomi)
- Setup and utilities:
- Declare dataset to be panel data (
xtset id tahun). Langkah wajib sebelum estimasi panel. - Summarize xt data (
xtsum), Tabulate xt data (xttab), Describe pattern of xt data (xtdescribe). - Line plots of panel data (
xtline).
- Declare dataset to be panel data (
- Linear models for cross-sectional time-series:
- Linear regression with fixed effects (
xtreg, fe). - Linear regression with random effects (
xtreg, re). - Between-effects (
xtreg, be). - Linear regression with population-averaged effects (
xtreg, pa). - GLS regression with AR(1) disturbances (
xtregar). - Dynamic panel-data estimation (
xtabond,xtdpd,xtdpdsys): Arellano-Bond dan Blundell-Bond (System GMM). - Instrumental-variables panel regression (
xtivreg), Hausman-Taylor (xthtaylor). - Stochastic frontier analysis (
xtfrontier). - Mixed models (
xtmixed,mixed).
- Linear regression with fixed effects (
- Binary/count outcomes (panel):
xtlogit,xtprobit,xtpoisson,xtnbreg,xttobit. - Postestimation dan uji panel:
- Hausman specification test (
hausman fe re) memilih FE atau RE. - Breusch-Pagan LM test for random effects (
xttest0). - Test of serial correlation (
xtserial), Test of heteroskedasticity (xttest3), Pesaran CD test (xtcsd). - Unit-root tests for panel data (
xtunitrootdengan LLC, Breitung, IPS, Fisher, Harris-Tzavalis, Hadri).
- Hausman specification test (
- Untuk uji Chow-like (F-test efek tetap), hasil F test muncul pada output
xtreg, fe.
11. Time Series (setara fungsi EViews untuk runtun waktu)
- Setup and utilities:
- Declare dataset to be time-series data (
tsset): wajib sebelum analisis. Perintah:tsset bulansetelah mengubah tanggal ke format waktu STATA (tsset waktu, monthly). - Fill in gaps in time variable (
tsfill), Time-series operators (L., D., F., S.) sepertiL.y(lag) danD.y(selisih). - Graphs: Time-series line plot, Autocorrelations & partial autocorrelations, Correlogram, Cross-correlogram, Periodogram.
- Declare dataset to be time-series data (
- Tests:
- Augmented Dickey-Fuller unit-root test (
dfuller). - Phillips-Perron unit-root test (
pperron). - DF-GLS unit-root test (
dfgls). - Zivot-Andrews structural-break unit root (
zandrews, ado tambahan). - Breusch-Godfrey LM (
estat bgodfrey), Durbin-Watson (estat dwatson), Durbin alternative (estat durbinalt). - ARCH LM test (
estat archlm), Portmanteau (Box-Pierce/Ljung-Box) test (wntestq), White-noise test (wntestb), Cumulative periodogram. - Structural break (
estat sbsingle,estat sbknown).
- Augmented Dickey-Fuller unit-root test (
- ARIMA and ARMAX models (
arima): ARIMA dengan variabel eksogen. - ARCH/GARCH (
arch,arch ... , garch()): ARCH, GARCH, EGARCH, TARCH, dan sejenisnya. - Vector autoregressive (VAR) models:
- Estimate VAR (
var). - Lag-order selection statistics (
varsoc): AIC, SBIC, HQIC, FPE, LR. - Check stability of VAR (
varstable): akar karakteristik. - Granger causality (
vargranger). - LM test for autocorrelation (
varlmar) dan Normality test (varnorm). - Structural VAR (
svar). - Impulse-response functions and forecast-error variance decomposition (
irf create,irf graph,irf table).
- Estimate VAR (
- Vector error-correction model (VECM):
- Johansen cointegration test (
vecrank). - Estimate VECM (
vec). - Stability and diagnostic tests.
- Johansen cointegration test (
- Dynamic factor models (
dfactor), Unobserved-components model (ucm). - Time-series smoothers: Moving-average filter (
tssmooth ma), Exponential smoothing (tssmooth exp), Holt-Winters, Hodrick-Prescott filter (tsfilter hp), Baxter-King, Christiano-Fitzgerald. - Forecasting:
forecastuntuk model dan skenario, serta prediksi (predict) pasca estimasi. - Regression with ARMA errors, Newey-West regression (
newey) untuk standar error HAC. - Prais-Winsten dan Cochrane-Orcutt regression (
prais): perbaikan autokorelasi. - ARDL dan bounds test: tersedia lewat paket tambahan (
ardl, perintah komunitas) atau fitur bawaan pada versi terbaru. - Regime-switching models (
mswitch) dan Threshold regression (threshold) pada versi 15 ke atas.
12. Multivariate Analysis
- Factor analysis (
factor), Principal component analysis (pca). - Cluster analysis (
cluster), Discriminant analysis (discrim). - MANOVA, Canonical correlation (
canon). - Multidimensional scaling (
mds), Correspondence analysis (ca). - Procrustes analysis.
- Postestimation untuk factor analysis: KMO (
estat kmo), rotation (rotate), scree plot (screeplot).
13. Structural Equation Modeling (SEM)
- Model building and estimation (
sem) dengan SEM Builder (gambar diagram jalur seperti SmartPLS/AMOS). - Generalized SEM (
gsem). - Confirmatory factor analysis, path analysis, latent growth curve models.
- Postestimation: Goodness-of-fit (
estat gof, stats(all)) memberikan RMSEA, CFI, TLI, SRMR, dan Chi-square. Modification indices (estat mindices), Standardized estimates (sem, standardized), Direct/indirect/total effects (estat teffects).
14. Postestimation
Menu yang selalu aktif setelah estimasi dijalankan.
- Predictions and residuals (
predict): fitted values, residual, dan lainnya. - Marginal means, predictive margins, marginal effects (
margins), Contrasts (contrast), Pairwise comparisons (pwcompare). - Test linear hypotheses after estimation (
test): uji Wald. - Test nonlinear hypotheses (
testnl), Linear combination of estimates (lincom). - Likelihood-ratio test (
lrtest). - Specification, diagnostic, and goodness-of-fit analysis:
- Variance inflation factors (
estat vif): multikolinearitas. - Test for heteroskedasticity (
estat hettest): Breusch-Pagan. - Information matrix test (
estat imtest): termasuk White. - Ramsey RESET test (
estat ovtest): spesifikasi model. - Szroeter's test, Cook-Weisberg.
- Link test (
linktest). - Information criteria (
estat ic): AIC dan BIC. - Hausman test (
hausman). - Regression diagnostics: DFBETA, Cook's D, leverage (
predict, leverage).
- Variance inflation factors (
- Manage estimation results (
estimates store,estimates table,estimates restore): menyimpan beberapa model untuk dibandingkan berdampingan. - Summary statistics for model (
estat summarize). - Covariance matrix of estimators (
estat vce).
15. Resampling
- Bootstrap estimation (
bootstrap). - Jackknife estimation (
jackknife). - Monte Carlo simulation (
simulate). - Permutation tests (
permute).
16. Survival Analysis
- Setup (
stset): wajib sebelum analisis survival. - Kaplan-Meier (
sts), Cox proportional hazards (stcox), Parametric survival (streg), Competing risks (stcrreg), Life tables (ltable). - Test of proportional-hazards assumption (
estat phtest).
17. Epidemiology and Related
Tables for epidemiologists (cs, cc, ir), Mantel-Haenszel, Meta-analysis (meta), Kappa agreement (kap), Diagnostic test accuracy.
18. Survey Data Analysis
- Setup (
svyset): mendeklarasikan desain survei (strata, cluster, bobot). - Survey regression (
svy: regress), Survey logit (svy: logit), Survey summary statistics, Survey tabulations.
19. Multilevel Mixed-Effects Models
mixed, melogit, meprobit, mepoisson, menbreg untuk data bertingkat (siswa dalam sekolah, pasien dalam rumah sakit).
20. Bayesian Analysis
Bayesian regression (bayes: regress), Bayesian model comparison (bayesstats ic), Posterior summaries (bayesstats summary), Convergence diagnostics (bayesgraph).
21. Treatment Effects
Treatment-effects estimation (teffects): PS matching (teffects psmatch), Inverse-probability weighting (teffects ipw), Regression adjustment (teffects ra), Doubly robust (teffects aipw), Endogenous treatment (etregress), Difference-in-differences (didregress, xtdidregress) pada versi 17 ke atas.
22. Lasso and Machine Learning (versi 16 ke atas)
lasso, elasticnet, dsregress (double-selection lasso), poregress, cvplot, serta Cross-validation tools.
23. Sample Selection
Heckman selection model (heckman), Selection with probit (heckprobit), Endogenous switching regression (movestay).
24. Other Statistics
Kernel density, Lowess smoothing (lowess), Nonparametric regression, Item response theory (irt), Finite mixture models (fmm), Latent class analysis (gsem, lclass()).
Catatan: Tidak semua submenu di atas muncul di setiap versi. Misalnya, Lasso, DID, Bayesian, dan Choice Models hanya ada di versi lebih baru. Beberapa uji populer (seperti ARDL dan uji kausalitas Dumitrescu-Hurlin) dijalankan lewat paket tambahan (
ssc install), bukan menu bawaan.
Kenapa Menu Statistics Penting?
Hampir seluruh analisis inti dijalankan dari sini. Untuk regresi dasar: Statistics → Linear models and related → Linear regression. Untuk data panel: Statistics → Longitudinal/panel data. Untuk time series: Statistics → Time series. Setiap hasil estimasi kemudian diuji lewat Postestimation (asumsi klasik, prediksi, dan uji Wald).
Comments
Post a Comment