Using Stata for Survey Data Analysis
Minot
Page 57
5. Using matrices created by Stata
Some Stata commands create matrices which can be retrieved and used. For example, all the
regression commands create the following:
e(b) coefficient vector
e(V) variance-covariance matrix of the estimates
And these matrices can be used as follows:
matrix beta = e(b)
creates a vector called beta with the estimated coefficients
matrix cov = e(V)
creates a matrix called cov with the estimated covariances
6. Accumulating cross-product matrices
Most statistical computations involve matrix operations such as X'X or X'WX. In many cases, X may
have a very large number of rows and a small number of columns. Stata has a special command for
calculating cross-products in these cases. Type “help matacum” for more information.
15. Matrix utilities
matrix dir
lists the currently defined matrices
matrix list
displays the contents of a matrix
matrix rename
renames a matrix
matrix drop
deletes a matrix
Minot
Using Stata for Survey Analysis
Page 58
Annex 1: Quick reference guide to Stata commands
Command
Description
Command
Description
Exploring data
cd
clear
use
describe
list
summarize
tabulate
tab1
tab2
save
help
bysort option
if option
in option
set more on
set more off
set mem XXm
set scrollbufsize
Do'stlaringiz bilan baham: |