Skip to content

Commit

Permalink
README edits for GAM model addition
Browse files Browse the repository at this point in the history
  • Loading branch information
HPCurtis committed Jul 12, 2024
1 parent 3db580e commit 666dff7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This a simple example of an ITS analysis similar to that applied within the Caus
Of course, the assumption of linearity might be potentially a strong one. However, the seasonally adjusted data shows the general overall increase in the number of cattle slaughtered through time that coincides with generally increased size and productivity of the cattle industry within Australia through time.

![x](https://github.com/HPCurtis/causalcovidcattle/blob/main/img/timeseries.png?raw=true)
Fig 1: Overall timeseries for ABS data on cattle salughter numbers pre and post COVID lockdown date.
Fig 1: Overall timeseries for ABS data on cattle slaughter numbers pre and post COVID lockdown date.
## Forecasts
```
# Generate forecasts for the post-covid period.
Expand Down Expand Up @@ -101,10 +101,10 @@ lost_revenue_lower = totallower * cattle_levy
```

### Generalised additive modelling
The following plots are the result of using the MGCV package and associated methods to fit a additive model to avoid repetition not all of the code is not provided in detail here. See, the R directory within the repository for that. But much of it is just variation of the same general workflow.
The following plots are the result of using the MGCV package and associated methods to fit a additive model. To avoid repetition not all of the code is provided in detail here. See, the R directory within the repository for that. But much of it is just variation of the same general workflow.

```
# Fit of genralied additive model smoother on timeseries data denoted s(t) using mgcv.
# Fit of generalied additive model smoother on timeseries data denoted s(t) using mgcv.
fitgam <- gam(TotalState ~ s(t), method = "REML", data = df_sapre)
```

Expand All @@ -127,7 +127,7 @@ Table 1. Causal estimates of impact on the total number on cattle slaughtered po
- Beef production equated to 20% of the Australian farm production a few year before Covid (2016-2017). Also, the beef industry was valued at $12.7 billion (Australian dollars) to the Australian economy

- Tax levy
Within Australia the sale of each head cattle their is a $5 (Aus) dollar levy tax on each head of cattle sold. The model estimates here suggest a Covid-19 cost to the Australian goverment anywhere from 13,316,392 to 60,767,606 in lost tax revenue.
Within Australia the sale of each head cattle their is a $5 (Aus) dollar levy tax on each head of cattle sold. The model estimates here suggest a Covid-19 cost to the Australian goverment anywhere from 13,316,392 to 60,767,606 (based linear model) or 13,535,822 to 41,725,400 (GAM model) in lost tax revenue.

## References

Expand Down

0 comments on commit 666dff7

Please sign in to comment.