MONTHLY {bimets} | R Documentation

## Monthly Time Series (Dis)Aggregation

### Description

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

### Usage

    MONTHLY(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 input time series: STOCK: the value of the input time series in the last observation of a month is assigned to the same month of the output time series. NSTOCK: the value of the input time series in the last non-missing observation of a month is assigned to the same month of the output time series. SUM: the sum of input observations in a month is assigned to the same month of the output time series. NSUM: the sum of input non-missing observations in a month is assigned to the same month of the output time series. AVE: the average of input observations in a month is assigned to the same month of the output time series. NAVE: the average of input non-missing observations in a month is assigned to the same month of the output time series. Only for quarterly, semiannual or annual input time series: NULL: (default) the output value of each monthly observation is set equal to the value of the input observation the month 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 month 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 month 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 month 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 monthly BIMETS time series.

### See Also

`ANNUAL`
`SEMIANNUAL`
`QUARTERLY`
`DAILY`

### Examples

    	#TS FREQ 2 SEMIANNUAL TO MONTHLY
    	ts1=TSERIES((1:10),START=c(2000,1),FREQ=2);
    	TABIT(MONTHLY(ts1,fun='INTERP_CENTER'));

    	#TS DAILY TO MONTHLY
    	ts1=TSERIES((1:366),START=c(2000,1),FREQ='D');
    	TABIT(MONTHLY(ts1,fun='STOCK'));

[Package bimets version 1.4.0 Index]