Command Reference : Function Reference : Function Reference: T
  
 
@trendbr
 
Trend with break.
Syntax: @trendbr([d])
d: (optional) date or observation
Return: series
Returns a breaking time trend that is zero for each observation prior to and at the break point, and increases by one for each observation following the break.
The optional date or observation d may be provided to indicate the break/starting point for the trend. If d omitted, the break point is assumed to be the first observation, and the function produces a simple trend.
This function is panel aware. In this context, trend values are defined sequentially across the entire set of available cross-section dates, and then matched to the individual cross-section dates. If there is a specific date that is missing in one cross-section, but is present in another, there will be a gap (non-sequential values) in the trend in the former. Thus, the panel trend may be thought of as a calendar trend that uses the calendar defined by dates observed in the workfile.
To obtain a simple panel trend in which values begin at 1 and sequentially increase by 1, you may use the @obsid function.
Examples
series tbr90q1 = @trendbr("1990q1")
creates a trend series based at 0 in 1990q1. Observations before 1990q1 will be set to 0; observations after 1990q1 will sequentially increase by 1.
Cross-references
See also @obsid, @trend and @trendc.