{smcl}
{* *! version 0.23}{...}
{vieweralsosee "" "--"}{...}
{vieweralsosee "Install log2markup" "ssc install log2markup"}{...}
{vieweralsosee "Help log2markup (if installed)" "help log2markup"}{...}
{vieweralsosee "Help crossmat" "help crossmat"}{...}
{vieweralsosee "Help dummynizer" "help dummynizer"}{...}
{vieweralsosee "Help matprint" "help matprint"}{...}
{vieweralsosee "Help mat2xl" "help matprint"}{...}
{vieweralsosee "Help matrix2stata" "help matrix2stata"}{...}
{vieweralsosee "Help onewai" "help onewai"}{...}
{vieweralsosee "Help metadata" "help metadata"}{...}
{vieweralsosee "Help strofnum" "help strofnum"}{...}
{vieweralsosee "Help strtonum" "help strtonum"}{...}
{vieweralsosee "Help subselect" "help subselect"}{...}
{vieweralsosee "Help sumat" "help sumat"}{...}
{vieweralsosee "Help which_edit" "help which_edit"}{...}
{viewerjumpto "Description" "matrixtools##description"}{...}
{viewerjumpto "lmatrixtools source code" "matrixtools##source"}{...}
{viewerjumpto "Author and support" "matrixtools##author"}{...}
{title:Title}
{phang}
{bf:matrixtools} {hline 2} A set of Stata commands and Mata functions to build,
present and style Stata and Mata matrices.
{marker description}{...}
{title:Description}
{pstd}Commands to build, present and style Stata matrices and present data in
easy ways. And using Mata to do so.
Most of the commands relies heavily on the Mata code in lmatrixtools.mlib.
The sourcecode to lmatrixtools.mlib is in lmatrixtools.mata.
{p_end}
{pstd}{help crossmat:crossmat} is wrapper for {help tabulate:tabulate}.
All tables possible from {help tabulate:tabulate} are accessible as Stata
matrices.{p_end}
{pstd}{help dummynizer:dummynizer} generates Stata dummy variables using Mata
matrix syntax.{p_end}
{pstd}{help filaby:filaby} marks for each value of first variable first and
last value for second variable within a frame of maxdist.{p_end}
{pstd}{help matprint:matprint} presents Stata matrices in the log.
It has a simple but powerfull way of setting decimals cellwise.
{cmd:matprint} can export Stata matrices in styles smcl,
csv, latex, html and markdown. This way output from can be integrated into
documents generated by {browse "https://ideas.repec.org/c/boc/bocode/s458147.html":log2markup}.{p_end}
{pstd}{help mat2xl:mat2xl} convert a matrix expression into a string formatted
Mata matrix and inserts the string matrix into a sheet in an Excelbook.{p_end}
{pstd}{help matrix2stata:matrix2stata} converts a matrix into variables. The
key difference to {help mkmat:mkmat} is that roweq and rownames becomes
categorized variables, ie integervalued with a value label. The purpose is to
ease graphing matrix content.{p_end}
{pstd}{help metadata:metadata} is a mesh-up of {help describe:describe} and
{help codebook:codebook}. It can be used on the current file in the data window,
and using the {help:using} modifier on can specify a non-opened dataset or a
path to get a description of the contents of all datasets there.{break}
The metadata can be saved into a dataset or styled in latex, html markdown, csv,
or smcl and saved as such.{break}
This way output from can be integrated into documents generated by
{browse "https://ideas.repec.org/c/boc/bocode/s458147.html":log2markup}.{p_end}
{pstd}{help onewai:onewai} is immediate oneway analysis of variance similar to
{help oneway:oneway} and {help loneway:loneway}.
However, here all results are gathered in matrices.
Input is either a matrix of n's, means and standard deviations or n's, means
and standard deviations given separately.{p_end}
{pstd}{help regmat:regmat} is prefix command to a regression template.{break}
A regression template is simply a regression command.{break}
Each combination of one outcome variable, one exposure variable and one
adjustment set is inserted just after the regression command.{break}
Then all regression estimates of exposures are placed in a matrix ordered by
outcome and exposure variables rowwise and adjustment columnwise.
{break}
The resulting matrix is saved in the {help return:return list} for further
usage.
{break}
The {help regmat##matprint:matprint options} makes it easy to integrate the
result table into a {browse "https://ideas.repec.org/c/boc/bocode/s458147.html":log2markup}.
{break}
Together with the {browse "https://ideas.repec.org/c/boc/bocode/s458012.html": basetable}
the command {cmd:regmat} generates the two typical tables for reporting
epidemiological research.{break}
The resulting tables are easy to integrate into the final text using eg.
{browse "https://ideas.repec.org/c/boc/bocode/s458147.html":log2markup} or
{help putexcel:putexcel}.
{p_end}
{pstd}{help subselect:subselect} generates a marker variable with name specified
by option {opt gen:erate(name)}.
The grouping variable is specified the varname argument.
The marker marks all group ids, where at least one row per group id satisfies
the conditions in {help if} and {help in}.{p_end}
{pstd}{help strofnum:strofnum} transform a numeric variable to a string variable using
the value label if it exists. Otherwise the format is used.{p_end}
{pstd}{help strtonum:strtonum} replaces a string variable with a categorical numeric
variable with a value label.{p_end}
{pstd}{help sumat:sumat} generates a summary matrix based in part on the command
{help summarize:sumarize}. Statistics like eg unique values and missing values are
added. The resulting matrix are saved for futher use.
{cmd:sumat} is using {cmd:matprint} for the output.{p_end}
{pstd}{help which_edit:which_edit} finds and opens the code file or the help
file in the Do-file Editor.{p_end}
{pstd}{cmd:lmatrixtools} is the back bone of this package. It is written in
{help mata:Mata}.{p_end}
{pstd}{cmd:ltoxl_v13} is the Stata 13 and up Mata code for {help mat2xl:mat2xl}.{p_end}
{pstd}{cmd:ltoxl_v14} is the Stata 14 and up extension Mata code for
{help mat2xl:mat2xl}.{p_end}
{pstd}Requires: Stata 12 and up.{p_end}
{marker source}{...}
{title:lmatrixtools source code}
{p 4 4 2}
{view lmatrixtools.mata, adopath asis:lmatrixtools.mata}
{p_end}
{marker source}{...}
{title:ltoxl_v13 source code}
{p 4 4 2}
{view ltoxl_v13.mata, adopath asis:ltoxl_v13.mata}
{p_end}
{marker source}{...}
{title:ltoxl_v14 source code}
{p 4 4 2}
{view ltoxl_v14.mata, adopath asis:ltoxl_v14.mata}
{p_end}
{marker author}{...}
{title:Authors and support}
{phang}{bf:Author:}{break}
Niels Henrik Bruun, {break}
Aalborg University Hospital
{p_end}
{phang}{bf:Support:} {break}
{browse "mailto:niels.henrik.bruun@gmail.com":niels.henrik.bruun@gmail.com}
{p_end}