SEMIANNUAL {bimets} | R Documentation

## Semiannual (Dis)Aggregation

### Description

This function returns a semi-annual (dis)aggregated time series, by using as input an annual, quarterly, monthly or daily time series.

### Usage

    SEMIANNUAL(x = NULL, fun = NULL, avoidCompliance = FALSE, ...)

### Arguments

`x` | Input time series that must satisfy the compliance control check defined in `is.bimets`.
`fun` | Only for daily or monthly or quarterly input time series: STOCK: the value of the input time series in the last observation of a half-year is assigned to the same half-year of the output time series. NSTOCK: the value of the input time series in the last non-missing observation of a half-year is assigned to the same half-year of the output time series. SUM: the sum of input observations in a half-year is assigned to the same half-year of the output time series. NSUM: the sum of input non-missing observations in a half-year is assigned to the same half-year of the output time series. AVE: the average of input observations in a half-year is assigned to the same half-year of the output time series. NAVE: the average of input non-missing observations in a half-year is assigned to the same half-year of the output time series. Only for annual input time series: NULL: (default) the output value of each half-year observation is set equal to the value of the input observation the half-year belongs to (i.e. duplicated values over the period) INTERP_END: the value of the input time series in a period is copied into the last half-year of the output time series that lies in the same period. Other values are calculated by linear interpolation. INTERP_CENTER: the value of the input time series in a period is copied into the median half-year of the output time series that lies in the same period. Other values are calculated by linear interpolation. INTERP_BEGIN: the value of the input time series in a period is copied into the first half-year of the output time series that lies in the same period. Other values are calculated by linear interpolation.
`avoidCompliance` | If `TRUE`, compliance control check of input time series will be skipped. See `is.bimets`
`...` | Backward compatibility.

### Value

This function returns a semiannual BIMETS time series.

### See Also

`ANNUAL`
`QUARTERLY`
`MONTHLY`
`DAILY`

### Examples

    	#TS QUARTERLY TO SEMIANNUAL
    	n=14;
    	xArr=(n:0);
    	ts1=TSERIES(xArr,START=c(2000,1),FREQ='Q');
    	print(SEMIANNUAL(ts1,fun='NAVE'));

    	#TS ANNUAL TO SEMIANNUAL
    	ts1=TSERIES((1:10),START=c(2000,1),FREQ=1);
    	print(SEMIANNUAL(ts1,fun='INTERP_END'));

[Package bimets version 1.4.0 Index]