Object Reference : Object View and Procedure Reference : Group
  
 
ddtabopts
Group Proc
Set table default options for dated data tables.
Specifies the table default options for the group’s dated data table view. To set row specific options that override the defaults, use the ddrowopts proc.
Syntax
group_name.ddtabopts args
Arguments
 
display(arg, n)
Specify the data to display in each table row. arg can be “first”, “last” or “year”.
“first” or “last” will display annual totals, plus the first, or last, n observations in each row.
“year” will display observations for n years of data per row.
firstfreq(freq)
Sets the frequency for the first column grouping: freq can be “n”(native), “a”(annual), “q”(quarterly), “m”(monthly).
secfreq(freq)
Sets the frequency for the second column grouping: freq can be “none” (none), “n”(native), “a”(annual), “q”(quarterly), “m”(monthly).
nalabel(“arg”)
Sets the label for NA values to arg.
+/-displayname
Use display names as default labels.
transform(row, trans)
Set the transformation method for row row. trans can be: “l”(level), “d”(1 period diff), “yd”(year difference), “pc”(1 period % change), “pca”(1 period % chg-AR), “pcy”(year % chg).
freqconv(row, conv)
Set the frequency conversion method for the specified row. conv can be “avgtran” (avg then transform), “tranavg” (transform then avg), “sumtran” (sum then transform), “first” (first period), “last”(last period).
format(fmt= new_format, units=new_units, prefix=” “, suffix=” “, +/-thousand, +/-comma, +/-parens)
Assign a custom prefix/suffix to the number, add a separator (comma or point) to denote thousands, replace a comma with a decimal point, or bracket negative numbers with parenthesis:
fmt can be: “f[.prec]”(fixed decimal), “c[.prec]”(fixed characters), “auto”, “serformat”(series format).
units can be: “N”(native), “P”(percent), “T”(thousands), “M”(millions), “B”(billions), “TR”(trillions)
colheader(+/-b, +/- i)
Sets column headers to bold or italic style.
rowheader(+/-b, +/- i)
Sets row headers to bold or italic style.
fillcolor(colorspec)
Set the table row background color to colorspec. colorspec may consist of an @rgb(r,g,b) specification or it may be the name of a basic color such as “white”, “blue”, “red”, “black”, etc.
altfillcolor(colorspec)
Set the table alternate row background color to colorspec. colorspec may consist of an @rgb(r,g,b) specification or it may be the name of a basic color such as “white”, “blue”, “red”, “black”, etc.
font(row, “name”, size, +/–b, +/–I, +/–s, +/–u)
Sets the font, size and style. name should be the quoted name of the font, size should be an integer size value. You may use +b, +i, +s or +u to set bold, italic, strikeout or underline respectively.
yrformat(arg)
Sets the date format for year date labels. arg may be “YYYY” (4-digit years) or “YY” (2 digit years).
qtrformat(arg)
Sets the date format for quarterly date labels. arg may be “QR” (upper-case Roman numerals), “qr” (lower-case Roman numerals), “[Q]Q” (“Q” followed by the quarter number), “Q” (quarter number), “Mon” (3 letter month abbreviation for first month in quarter), “Month” (full month name for first month in quarter).
monformat(arg)
Sets the date format for monthly date labels. arg may be “[M]mm” (“M” followed by month number), “mm” (month number), “MM” (month number with preceding zero), “[M]MM” (“M” followed by month number with preceding zero) “Mon” (3 letter month abbreviation), “Month” (full month name), “M” (upper-case first letter of month name), or “m” (lower-case first letter of month name).
qtryrformat(arg)
Sets the joint date format for quarter and year. Only applicable if “Display(first)” or “Display(last)” is used.
arg may be: “YYYY[q]Q]”, “YYYY[Q]Q”, “YYYY:Q”, “YY[q]Q”, “YY[Q]Q”, “YY:Q”, “YYYY QR”, “YYYYqr”, “YYYY qr”, “YY QR”, “YYqr”, “YY qr”, “Mon YYYY”, “Mon YY”, or “Month YYYY”.
See description of “yrformat” and “qtrformat” above for details.
monyrformat(arg)
Sets the joint date format for month and year. Only applicable if “Display(first)” or “Display(last)” is used.
arg may be: “YYYY[m]mm]”, “YYYY[M]mm”, “YYYY[m]MM”, “YYYY:M”, “YY[m]mm”, “YY[M]mm”, “YY[m]MM”, “YY:mm”, “YY:MM”, “Mon YYYY”, “Mon YY”, “Month YYYY”, “Month YY”, “YYMon”, or “YY-Mon”.
See description of “yrformat” and “monformat” above for details on each.
+/– endperiod
Use end of period date labels.
Examples
group cgrp cenergy cfood chealth
cgrp.dtable
cgrp.ddtabopts firstfreq(a) secfreq(none) display(year,1)
creates the group CGRP from the series CENERGY, CFOOD AND CHEALTH, and then it displays the dated data table for that group. ddtapopts is used to set the first table block frequency to annual and the second frequency to none, with one year of data displayed in each row.
group fgrp houliab hounetworth houassets
fgrp.dtable
fgrp.ddtabopts +displayname firstfreq(q) secfreq(a) colheader(i) font("Calibri",10) altfillcolor(yellow) qtrformat([Q]Q)
The ddtabopts command sets the table options for the group FGRP to show the display-names of each series in place of the series names, sets the first block frequency to quarterly and the second to annual, sets the column header style to italics, changes the font to Calibri size 10, sets the alternative row color to yellow, and sets the display for quarterly data to “Q[q]”.
group govgrp govinv govpurchases govsav
govgrp.dtable
govgrp.ddtabopts qtrformat(qr) nalabel("NA") rowheader(+b)
creates the group GOVGRP out of the series GOVINV, GOVPURCHASES, and GOVSAV and then the dated data table. The ddtabopts command is set to show the quarter in short case roman numerals, then adds an "NA" to any missing data, it also bold the row headers.
group hgrp starts singlestarts multistarts
hgrp.dtable
hgrp.ddtabopts firstfreq(a) secfreq(none) +displayname fillcolor(@rgb(205,201,201)) yrformat(YY) format(units=n, fmt=f.2)
The ddtabopts command sets table default options for the group HGRP, with the first column grouping frequency as annual and the second grouping to none. The table defaults will show displaynames in place of series names, will use a light gray row fill color specified by RGB. The year format is set to show only the last two digits of the year and the numerical display format is set to native with two decimal places.
group incgrp natincome persincome dispincome
incgrp.dtable
incgrp.ddtabopts font("arial",10) colheader(b)
sets the table default font to size 10 Arial and specifies bold column headers.
Cross-references
See “Dated Data Table” for a description of dated data tables and formatting options.
See also dtable and ddrowopts.