楼主: Statachen
25655 101

[讨论]Stata: Resources For Learning Stata [推广有奖]

61
Nicolle 学生认证  发表于 2006-5-6 12:40:00
提示: 作者被禁止或删除 内容自动屏蔽

62
Nicolle 学生认证  发表于 2006-5-6 12:43:00
提示: 作者被禁止或删除 内容自动屏蔽

63
Trevor 发表于 2006-5-6 12:56:00

Question:

I recently ran a do-file that contained several tobit and xttobit models and later decided to rerun one of the xttobit models.

I was surprised to find that I got different results. The puzzle to me is that the iterations that fit the full model are identical to what I estimated the other day (through iteration 6), and then they diverge.

The data have not changed, and the correct sample and variables are being used. The only difference is that I am running one regression instead of many. Is there some random component due to the use of quadrature?

Answer:

For those not familiar with xttobit, it and several other commands that estimate random-effects models use Gauss–Hermite quadrature and adaptive quadrature to approximate the high-dimension integrals that are part of the likelihood for these models. The quadrature approximation can be poor for some datasets, and I suspect this is what this user is encountering.

As the user suggests, there is a random component to quadrature in that the within-panel sort will almost certainly be different unless you start Stata fresh and run exactly the same commands before running xttobit. Sort order is not important to the likelihood, but if the likelihood for the dataset cannot be approximated well by quadrature, the order can affect the quadrature computation (more on this later).

Quadrature is one of the most accepted approaches to estimating these models, but there are three cases where it often breaks down: (1) large panel sizes, (2) high within-panel correlation, or (3) variables that are constant or near constant within panel. I don’t know if any of these are true for these data, but any observation that contributes in an extreme way to the likelihood can cause problems. See [XT] quadchk for a good discussion of these issues.

Stata’s quadchk command can help tremendously in assessing whether your data are appropriate for estimation using the quadrature approximation. quadchk works with all of the estimation commands that use quadrature and I definitely recommend that the user try quadchk on the model. I also heartily recommend that people estimating a random-effects model by quadrature check whether the quadrature is stable for their model. If you’re using Stata, use quadchk to do this.

We have tried to point everyone using commands that employ quadrature to quadchk by providing a Technical Note or example in the manual entry. In hindsight, these suggestions could have been stronger.

We at StataCorp could have artificially forced Stata to produce the same answer always from xttobit by performing a sort during quadrature, but we purposely did not do that. That strikes us as ducking the issue. If quadrature is not stable, better not to hide it.

Commands using quadrature have been the source of some debate around StataCorp. None of us are wholly comfortable with estimators that are prone to instability, even if that instability arises only in extreme cases. That is why we feel so strongly about providing quadchk to assess the appropriateness of the estimator for a given dataset. The near consensus here is that these estimators are valuable to those who need them even though they require care from all who use them. They are stable for most datasets. Admittedly, these are leading-edge models, and estimating them requires more understanding of numerical and approximation issues on the part the user than do most other estimation commands.

64
Trevor 发表于 2006-5-6 13:02:00

Stata help for estimation commands

help estimation commands
-------------------------------------------------------------------------------

Title


[I] estimation commands -- Quick reference for estimation commands

Description


For a discussion of properties shared by all estimation commands see
estcom.


This entry provides a quick reference for Stata's estimation commands.
Since enhancements to Stata are continually being added, type search
estimation commands for possible additions to this list; see
search.


command description
-------------------------------------------------------------------------
anova Analysis of variance and covariance
arch ARCH family of estimators
areg Linear regression with a large dummy-variable set
arima ARIMA, ARMAX, and other dynamic regression models
asmprobit Alternative-specific multinomial probit regression


binreg Generalized linear models: Extensions to the
binomial family
biprobit Bivariate probit regression
blogit Logistic regression for grouped data
bootstrap Bootstrap sampling and estimation
boxcox Box-Cox regression models
bprobit Probit regression for grouped data
bsqreg Quantile regression with bootstrap standard errors


ca Simple correspondence analysis
camat Simple correspondence analysis of a matrix
canon Canonical correlations
clogit Conditional (fixed-effects) logistic regression
cloglog Complementary log-log regression
cnreg Censored-normal regression
cnsreg Constrained linear regression


dprobit Probit regression, reporting marginal effects


eivreg Errors-in-variables regression


factor Factor analysis
factormat Factor analysis of a correlation matrix
fracpoly Fractional polynomial regression
frontier Stochastic frontier models


glm Generalized linear models
glogit Logit and probit for grouped data
gnbreg Generalized negative binomial model
gprobit Weighted least-squares probit regression for
grouped data


heckman Heckman selection model
heckprob Probit model with selection
hetprob Heteroskedastic probit model


intreg Interval regression
iqreg Interquantile range regressions
ivprobit Probit model with endogenous regressors
ivreg Instrumental variables (two-stage least-squares)
regression
ivtobit Tobit model with endogenous regressors


jackknife Jackknife estimation


logistic Logistic regression, reporting odds ratios
logit Logistic regression, reporting coefficients


manova Multivariate analysis of variance and covariance
mds Multidimensional scaling for two-way data
mean Estimate means
mfp Multivariable fractional polynomial models
mlogit Multinomial (polytomous) logistic regression
mprobit Multinomial probit regression
mvreg Multivariate regression


nbreg Negative binomial regression
newey Regression with Newey-West standard errors
nl Nonlinear least-squares estimation
nlogit Nested logit regression


ologit Ordered logistic regression
oprobit Ordered probit regression


pca Principal component analysis
pcamat Principal component analysis of a correlation or
covariance matrix
poisson Poisson regression
prais Prais-Winsten and Cochrane-Orcutt regression
probit Probit regression
procrustes Procrustes transformation
proportion Estimate proportions


_qreg Internal estimation command for quantile regression
qreg Quantile (including median) regression


ratio Estimate ratios
reg3 Three-stage estimation for systems of simultaneous
equations
regress Linear regression
rocfit Fit ROC models
rologit Rank-ordered logistic regression
rreg Robust regression


scobit Skewed logistic regression
slogit Stereotype logistic regression
sqreg Simultaneous-quantile regression
stcox Fix Cox proportional hazards model
streg Fit parametric survival models
sureg Zellner's seemingly unrelated regression
svar Structural vector autoregression models
svy: heckman Heckman selection model for survey data
svy: heckprob Probit regression with selection for survey data
svy: intreg Censored and interval regression for survey data
svy: ivreg Instrumental variables regression for survey data
svy: logistic Logistic regression, reporting odds ratios, for
survey data
svy: logit Logistic regression, reporting coefficients, for
survey data
svy: mean Estimate means for survey data
svy: mlogit Multinomial logistic regression for survey data
svy: nbreg Negative binomial regression for survey data
svy: ologit Ordered logistic regression for survey data
svy: oprobit Ordered probit regression for survey data
svy: poisson Poisson regression for survey data
svy: probit Probit regression for survey data
svy: proportion Estimate proportions for survey data
svy: ratio Estimate ratios for survey data
svy: regress Linear regression for survey data
svy: tabulate oneway One-way tables for survey data
svy: tabulate twoway Two-way tables for survey data
svy: total Estimate totals for survey data


tobit Tobit regression
total Estimate totals
treatreg Treatment-effects model
truncreg Truncated regression


var Vector autoregression models
var svar Structural vector autoregression models
varbasic Fit a simple VAR and graph impulse-response
functions
vec Vector error-correction models
vwls Variance-weighted least squares


xtabond Arellano-Bond linear, dynamic panel-data estimation
xtcloglog Random-effects and population-averaged cloglog
models
xtfrontier Stochastic frontier models for panel data
xtgee Fit population-averaged panel-data models using GEE
xtgls Fit panel-data models using GLS
xthtaylor Hausman-Taylor estimator for error-components
models
xtintreg Random-effects interval data regression models
xtivreg Instrumental variables and two-stage least squares
for panel-data models
xtlogit Fixed-effects, random-effects, and
population-averaged logit models
xtmixed Multilevel mixed-effects linear regression
xtnbreg Fixed-effects, random-effects, and
population-averaged negative binomial models
xtpcse OLS or Prais-Winsten models with panel-corrected
standard errors
xtpoisson Fixed-effects, random-effects, and
population-averaged Poisson models
xtprobit Random-effects and population-averaged probit
models
xtrc Random-coefficients models
xtreg Fixed-, between-, and random-effects, and
population-averaged linear models
xtregar Fixed- and random-effects linear models with an
AR(1) disturbance
xttobit Random-effects tobit model


zinb Zero-inflated negative binomial regression
zip Zero-inflated Poisson regression
ztnb Zero-truncated negative binomial regression
ztp Zero-truncated Poisson regression

[此贴子已经被作者于2006-5-6 13:08:51编辑过]

65
Multivariate 发表于 2006-5-6 20:00:00

[下载]The Language Of Choice For Time Series Analysis. Stata Journal.Stata

In this paper, I will discuss a number of Stata’s capabilities in the area of time series modeling, including data management and graphics. I will focus on a number of user – contributed routines, some of which have found their way into official Stata, with others likely to follow. For brevity, there are some areas I will not cover in this discussion: vector autoregressions and structural VARs, ARCH and GARCH modeling, cointegration tests ( now available in o  cial Stata’s July 2004 update) and panel unit root tests. I concentrate on a number of features and capabilities that may not be so well known, and present some new methodologies for time – series data analysis.

51567.pdf (183.43 KB, 需要: 1 个论坛币)

[此贴子已经被作者于2006-5-6 20:13:18编辑过]

66
Multivariate 发表于 2006-5-6 20:18:00

[下载]Learning Statistical Software Stata

Learning Statistical Software Stata

51568.rar (154.92 KB, 需要: 1 个论坛币) 本附件包括:
  • Learning Statistical Software Stata.chm

[此贴子已经被作者于2006-5-6 20:20:31编辑过]

67
Multivariate 发表于 2006-5-6 20:28:00

[下载]Svend Juul.Introduction of Stata 8.0.pdf

1. Installing, customizing and updating Stata 3

2. Windows in Stata 5

3. Suggested mode of operation 7

4. Getting help 9

5. Stata file types and names 10

6. Variables and observations 11

6.1. Variable names 11

6.2. Numeric variables 11

6.3. Missing values 12

7. Command syntax 13

8. Getting data into Stata 16

9. Documentation commands 18

10. Modifying data 20

10.1. Calculations 20

10.2. Selections 21

10.3. Renaming and reordering variables 23

10.4. Sorting data 24

10.5. Numbering observations 24

10.6. Combining files 25

10.7. Reshaping data 26

11. Description and analysis 27 11.1. Categorical data 27 11.2. Continuous data 30

12. Regression models 32 12.1. Linear regression 32 12.2. Logistic regression 33

13. Survival and related analyses 34

14. Graphs 38

15. Miscellaneous 54

15.1. Memory considerations 54

15.2. String variables 55

15.3. Dates. Danish CPR numbers 57

15.4. Random samples, simulations 59

15.5. Immediate commands 60

15.6. Sample size and power estimation 61

15.7. Ado- files 62

15.8. Exchange of data with other programs 63

15.9. For old SPSS users 63

16. Do- file examples 65

Appendix 1: Purchasing Stata and manuals 67

Appendix 2: Entering data with EpiData 68

Appendix 3: NoteTab Light: a text editor 70

Alphabetic index 71

51569.pdf (1.43 MB, 需要: 1 个论坛币)

68
Multivariate 发表于 2006-5-6 20:37:00

[下载]Xiaogang Wu.Quantitative Analysis in Social Sciences

Xiaogang Wu.Quantitative Analysis in Social Sciences

51570.pdf (1.6 MB, 需要: 1 个论坛币)

[此贴子已经被作者于2006-5-6 20:40:49编辑过]

69
ReneeBK 发表于 2006-5-6 21:01:00

[下载]Stata Online Users Guide

Top
-------------------------------------------------------------------------------

Category listings

Basics language syntax, expressions and functions, ...

Data management inputting, editing, creating new variables, ...

Statistics summary statistics, tables, estimation, ...

Graphics scatterplots, bar charts, ...

Programming and matrices do-files, ado-files, Mata, matrices

Help file listings

Language syntax advice on what to type

Manual datasets download datasets from the Reference manuals

Copyrights

70
ReneeBK 发表于 2006-5-6 21:05:00

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-24 21:59