help margstoalso see: statsto, statout, graphsto, graphout

Title

margsto -- Collecting results from margins | 13June2012

Overview

margsto is run after a margins command to collect and organize
basic information from margins command. margsto lists and saves this
information in a matrix named matrix_name. margsto
automatically combines information about estimates along with the values of
variables used in the margins command, i.e., information saved in r(at) return
after margins.

For more information and examples, please visit the Collect Website.

General syntax

margsto [matrix_name] [, options]

where matrix_name refers the matrix and file_names where information will be saved.
If matrix_names is not specified, margsto uses the matrix name MargSto.

Table of contents

1. Row and column operations
2. Viewing and formating
3. Matrix utilities
4. Row and column lists

Options

Row and column operations

statistics([name=]stat_name) save various statistics from margins if stat_names is indicated, margsto will save it in that column. You can rename statistics to name

The statistics that can be saved are:

statistics Description

b Estimates

est Same as b

estimate Same as b

pr Same as b

prob Same as b

lb Lower bound of confidence interval

ub Upper bound of confidence interval

pvalue p-value

pv same as pvalue

p same as pvalue

se Standard error

t t-value

z z-value

atvar([name=]stat_name) Specifies which variables used in margins' at option to add to matrix_name. You can rename columns to name

atoff Do not add variable names and values used in margins' at option to matrix_name

corder(list) Columns are selected and reordered to match list.

rorder(list) Rows are selected reordered to match list.

Viewing and formatting

label Information from r(at) return is used to create row
labels. The variable names and values used in margins' at option
become row names

nolist Suppress the display of matrix_name.

decimal(numlist) Set the number of decimal digits
for each column when listing the matrix.
Columns can have different numbers of decimal digits.
For example, statsto, list decimal(3 2).

title(title_string) Display title_string
above the matrix.

Matrix utilities

clear Remove the matrices from memory.

generate(column_list | column# [_all])
Variables are generated from the columns in matrix_name; _all selects all columns.

genstub(gen_stub)
Variables are named gen_stub+column_name.

Row and column lists

You can specify columns using column indices or column names.
For example, to specify the 1st, 7th and 4th columns, use: 1 7 4.
Assuming the columns are named Col#,
you can select the same columns as: Col1 Col7 Col4.
You can mix names and numbers: 1 7 Col4.
Adjacent columns can be selected using a dash.
For example, to select columns 3 through 9, you could use:
3-9 or Col3-Col9 or Col3-9 or 3-Col9.
The abbreviation _all selects all columns.
The same methods can be used to select rows.
For example, Row10 Row1 3-5 Row7-8 9-Row13
translates into the indices 10 1 3 4 5 7 8 9 10 11 12 13

Authors

Joseph D. Wolfe , Indiana University, jdwolfe@indiana.edu

J. Scott Long, Indiana University, jslong@indiana.edu

Also see

Manual: [M] matrix

Website: Collect Website