*! version 1.0 Jul2016
help tab2mat

Syntax

tab2mat varname
[if] [in]
[weight]
,
matrix(matname)
[options]

required

matrix(matname) indicate name of matrix for saved results

optional

nomiss exclude missing values

nofreq exclude frequency column

noperc exclude percent column

total add row with total

Description

tab2mat produces a one-way table and saves results in a matrix with appropriate labels. Saved matrix can easily be exported to excel (see putexcel).

Examples

. sysuse nlsw88.dta

. tab2mat race, matrix(A)

. tab2mat race, matrix(A) nofreq

. tab2mat union, matrix(A) noperc

. tab2mat union, matrix(A) nomiss

. tab2mat union, matrix(A) nomiss nofreq total

Author

Loris P. Fagioli, Irvine Valley College, CA
lfagioli@ivc.edu