diffpi



Stata help for diffpi

-------------------------------------------------------------------------------
help for diffpi
-------------------------------------------------------------------------------


Difference expressed as a percentage

diffpi #1 #2 [, format(%fmt) ]

Description

diffpi provides the percentage of #1 to be added or subtracted, depending on its positive or negative sign, to #1 to get #2. It is an immediate command, see help immed.

Options

format(%fmt) specifies the display format for presenting numbers. format(%3.2f) is the default; see help format.

Examples

. diffpi 100 20 . diffpi 80 100 . diffpi 46 43 . diffpi 46 43 , f(%5.4f) . diffpi 1.1 1.5

Support

http://nicolaorsini.altervista.org nicola.orsini@imm.ki.se

Worked examples for diffpi


Click here to run or save the do-file
. capture net install http://nicolaorsini.altervista.org/stata/diffpi

. which diffpi c:\ado\stbplus\d\diffpi.ado *! 1.0 N.Orsini 19 Jan 2005

. . diffpi 100 20 -80.00%

. diffpi 80 100 +25.00%

. diffpi 46 43 -6.52%

. diffpi 46 43 , f(%5.4f) -6.5217%

. diffpi 1.1 1.5 +36.36%

. return list

scalars: r(rdiff) = 36.36363636363635

macros: r(cmd) : "diffpi"


{Home | Author | Presentations | Publications | Software | Courses | Links}