Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update vignette #26

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions vignettes/rjd3nowcasting.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ library(rjd3nowcasting)

Once the package is loaded, there are four steps to follow:

1. Import data
1. Prepare and import data
2. Create or update the model
3. Estimate the model
4. Get results
Expand Down Expand Up @@ -134,11 +134,11 @@ news1 <- get_news(est0, data1, target_series = "Series 1", n_fcst = 2)
print(news1)
plot(news1)
```
## 1. Import data
## 1. Prepare and import data

The data can be imported from anywhere. Then, it is required to create a time-series object by using the well-known `stats::ts()` function like in the example.
This step is external to the package. Recall that DFM require all input data to be stationary. Once the data have been prepared accordingly and imported in R, it is required to create a time-series object with the data by using the well-known `stats::ts()` function like in the example.

In case of dynamic work, the columns of the dataset should remain the same from one time to another and in the same order. Only additional rows can be added reflecting the new data coming in.
In case of dynamic work, the columns of the dataset should remain the same from one time to another and in the same order. Only additional rows can be added reflecting the new data coming in.


## 2. Create/Update model
Expand Down Expand Up @@ -249,7 +249,7 @@ The function `get_results()` has a single argument which is an object of class '

### 4.2. Forecasts

The function `get_forecasts()` can be used to obtain forecasts of the variables, as well as the forecast errors standard deviation. You have access to both the forecasts of the transformed series (see section 3.2) and the raw series. As part of the output list, there is also extra output referred to as 'forecasts_only'. Those are just an extract of the forecasts of the raw series which contains only the forecasts, i.e. where the rest of the series does not appear together with the forecasts.
The function `get_forecasts()` can be used to obtain forecasts of the variables, as well as the forecast errors standard deviation. You have access to both the forecasts of the transformed series (see section 3.2) and the raw series. As part of the output list, there is also extra output referred to as 'forecasts_only'. Those are just an extract of the forecasts of the raw series which contains only the forecasts, i.e. where the rest of the series does not appear together with the forecasts. Note that for quarterly series (factor type "Q"), the forecast at the last month of the quarter should be the one considered. For instance, if the variable under consideration is made of quarterly growth rates, each forecast figure corresponds to the growth rate of the last three months compared with the three previous months (e.g. in August, it is the estimate of the growth rate between June-July-August and March-April-May).

The function `get_forecasts()` has two arguments. One is an object of class 'JD3_DfmEstimates' typically generated by the function `estimate_pca()`, `estimate_em()` or `estimate_ml()`. The other is the number of forecasting periods to consider, starting from the most up-to-date variable.

Expand Down
Loading