Skip to content

Commit

Permalink
Fix mistake. Plot true realisaitons.
Browse files Browse the repository at this point in the history
  • Loading branch information
AEBilgrau committed Aug 29, 2019
1 parent 554be8b commit 3ed2722
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vignettes/usage-example-general-model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ str(ds)

As can be seen, the `SimulateGMCMData` function returns a `list` containing the copula observations `u`, the unobserved process `z`, the latent groups `K`, and the `theta` used for simulation.

Plotting the true copula realisations and colouring by the true classes shows what we intend to estimate:

```{r data-plot}
plot(ds$u, col = ds$K)
```

A ranking of `u` (or `z`) corresponds to what would be the data in a real application.

```{r select-data, include=TRUE, echo=TRUE}
Expand Down Expand Up @@ -93,8 +99,8 @@ The results are also displayed by plotting

```{r plot_results}
par(mfrow = c(1,2))
plot(u, col = membership, asp = 1) # Plot of copula values
z <- GMCM:::qgmm.marginal(Uhat(x), theta = est_theta) # Estimate latent process
plot(uhat, col = membership, asp = 1) # Plot of estimated copula values
z <- GMCM:::qgmm.marginal(uhat, theta = est_theta) # Estimate latent process
plot(z, col = membership, asp = 1) # Plot of estimated latent process
```

Expand Down

0 comments on commit 3ed2722

Please sign in to comment.