{smcl} {* *! version 1.0.0 31jul2015}{...} {viewerdialog margins "dialog margins"}{...} {vieweralsosee "[R] margins" "help margins"}{...} {viewerjumpto "Description" "transform_margins##description"}{...} {viewerjumpto "Quick start" "transform_margins##quick"}{...} {viewerjumpto "Syntax" "transform_margins##syntax"}{...} {viewerjumpto "Options" "transform_margins##options"}{...} {viewerjumpto "Stored results" "transform_margins##results"}{...} {title:Title} {p2colset 4 22 25 2}{...} {p2col:{cmd:transform_margins}}{hline 2} Apply a transformation to estimates and confidence limits from {cmd:margins} {p_end} {marker description}{...} {title:Description} {pstd} {cmd:transform_margins} works on the {cmd:r(table)} result returned by {cmd:margins} and applys the specified transformation on the rows labeled {cmd:b}, {cmd:ll}, and {cmd:ul}. {marker quick}{...} {title:Quick start} {pstd} Probabilities after {cmd:logit} {cmd:sysuse auto} {cmd:logit foreign mpg} {cmd:margins, at(mpg=(5(5)40)) predict(xb)} {cmd:transform_margins invlogit(@)} {pstd} Number of events after {cmd:poisson} {cmd:webuse dollhills3} {cmd:poisson deaths i.smokes i.agecat, exp(pyears)} {cmd:margins agecat, predict(xb)} {cmd:transform_margins exp(@)} {marker syntax}{...} {title:Syntax} {p 8 15 2} {cmd:transform_margins} {it:exp} [{cmd:,} {it:options}] {pstd} where {it:exp} is a scalar expression where {cmd:@} represents the statistic being transformed. {synoptset 22}{...} {synopthdr:options} {synoptline} {synopt:{opt format(%fmt)}}format for table cells{p_end} {synopt:{opt mat:rix(name)}}matrix to store results{p_end} {synoptline} {marker options}{...} {title:Options} {phang} {opt format(%fmt)} specifies the numeric format for the table cells. {phang} {opt matrix(name)} specifies that {cmd:transform_margins} return the transformed estimates in matrix {it:name}. {marker results}{...} {title:Stored results} {pstd} {cmd:transform_margins} does not make any changes to {cmd:r()}.