Skip to content

Commit

Permalink
About to send it to CRAN. Now the vignette is rendered correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
contefranz committed Apr 10, 2021
1 parent ba0e1ed commit 6788523
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 31 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: msmtools
Type: Package
Title: Building Augmented Data to Run Multi-State Models with 'msm' Package
Version: 2.0.0
Date: 2021-04-07
Version: 2.0.1
Date: 2021-04-10
Authors@R: person("Francesco", "Grossetti",
email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5130-7745"))
Expand Down
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# msmtools 2.0.0 (development version)
# msmtools 2.0.1
***

This is a maintenance update. There are no major updates worth of notice besides few tweaks in
the vignette which was not rendered appropriately.

### Minor changes

* Fixed few issues in the vignette where plots were not rendered nicely.

# msmtools 2.0.0
***

**msmtools** sees several updates which come with potential breaking changes due to the dropping
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Building augmented data for multi-state models: the `msmtools` package

[![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-maturing.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![release](https://img.shields.io/badge/dev.%20version-2.0.0-blue)](https://github.com/contefranz/msmtools)
[![release](https://img.shields.io/badge/dev.%20version-2.0.1-blue)](https://github.com/contefranz/msmtools)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/msmtools)](https://cran.r-project.org/package=msmtools)

***
Expand Down
57 changes: 39 additions & 18 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
# msmtools 2.0.1

### Release summary

This is a maintenance update. There are no major updates worth of notice besides few tweaks in
the vignette which was not rendered appropriately.

### Package development

* macOS 10.15.7 with R 4.0.4

### R CMD build

* local MacOS 10.15.7
* win build created with `devtools::check_win_release()`
* multiplatform builds created with `devtools::check_rhub()`

### R CMD check results

* Everything looks amazing so far.

***

# msmtools 2.0.0

## Release summary
### Release summary

This marks a major redesign in how the package manages plots. It now uses **ggplot2**.
Also, most of the cumbersome arguments related to devices and plot layering have been improved and
substantially removed. The above changes are enough to declare that **msmtools** has now
reached full maturity and thus justify the jump to version 2.0.0.

## Package development
### Package development

* macOS 10.15.7 with R 4.0.4

## R CMD build
### R CMD build

* local MacOS
* win build through devtools::build_win()

## R CMD check results
### R CMD check results

* There were no ERRORs nor WARNINGs nor NOTEs.

Expand All @@ -27,26 +50,24 @@ Though the file is correct.
README. The former is included in the bibliography and the latter is due to
a Github link.


***


# msmtools 1.3

## Release summary
### Release summary

This is version 1.3 of **msmtools**

## Package development
### Package development

* macOS 10.12.5 with R 3.4.0

## R CMD build
### R CMD build

* local macOS
* win build through devtools::build_win()

## R CMD check results
### R CMD check results

* There were no ERRORs nor WARNINGs nor NOTEs.

Expand All @@ -61,20 +82,20 @@ a Github link.
***
# msmtools 1.2

## Release summary
### Release summary

This is version 1.2 of **msmtools**

## Package development
### Package development

* OS X 10.11.5 with R 3.3.0

## R CMD build
### R CMD build

* local OS X
* win build through devtools::build_win()

## R CMD check results
### R CMD check results

There were no ERRORs or WARNINGs.

Expand All @@ -86,20 +107,20 @@ This is due to the presence of a GitHub link which points at the file NEWS.md.
***
# msmtools 1.1

## Release summary
### Release summary

This is version 1.1 of **msmtools**

## Package development
### Package development

* OS X 10.11.4 with R 3.2.4

## R CMD build
### R CMD build

* local OS X
* win build through devtools::build_win()

## R CMD check results
### R CMD check results

There were no ERRORs or WARNINGs.

Expand Down
18 changes: 9 additions & 9 deletions vignettes/msmtools.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ msm_model = msm( status_num ~ augmented_int,
To run a comparison between the estimated and the empirical survival curves, we run the following
simple code:

```{r survplot_1, fig.align = 'center', fig.width = 5, fig.height = 4}
```{r survplot_1, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
gof1 = survplot( x = msm_model, km = TRUE )
```

Expand All @@ -337,7 +337,7 @@ If `to` is missing, `survplot()` checks what is the higher value in the
corresponding `msm` object and grabs it. Let's now plot the survival comparison for the transition
(OUT - DEAD):

```{r survplot_2, fig.align = 'center', fig.width = 5, fig.height = 4}
```{r survplot_2, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
gof2 = survplot( x = msm_model, km = TRUE, from = 2 )
```

Expand All @@ -353,7 +353,7 @@ explicitly pass a custom time sequence. This can be achieved by passing to the a
Consider our dataset and suppose we want to compute an estimated survival only for
specific points in time. The following code addresses this request.

```{r custom_time_seq, fig.align = 'center', fig.width = 5, fig.height = 4}
```{r custom_time_seq, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
time_seq = seq( 300, 800, by = 30 )
custom_time = survplot( x = msm_model, times = time_seq )
```
Expand All @@ -369,7 +369,7 @@ Kaplan-Meier curve is returned. The code below shows how this works.
<!-- `data.table`. Passing only `km = TRUE` won't return any data, even if they must -->
<!-- be computed anyway to plot results. -->

```{r returnKM, collapse = TRUE, fig.align = 'center', fig.width = 5, fig.height = 4}
```{r returnKM, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
km_out = survplot( x = msm_model, km = TRUE, out = "km")
```

Expand Down Expand Up @@ -405,7 +405,7 @@ used to compute the estimated survival as well. This can be achieve by setting
as many rows as the elements in `times`. If `times` is missing, then `survplot()`
uses `grid` to know how many time points are requested. An example is shown in the next snippet.

```{r returnP, collapse = TRUE}
```{r returnP, collapse = TRUE, fig.align='center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
fitted = survplot( x = msm_model, grid = 10, out = "fitted" )
```

Expand All @@ -430,7 +430,7 @@ Of course, you can request `survplot()` to return both the datasets by specifyin
In this case, a named list with three elements is returned. The mechanism to access the elements is
the same described above. The snippet below reports an example.

```{r return_all, collapse = TRUE, fig.align = 'center', fig.width = 5, fig.height = 4}
```{r return_all, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
# just running survplot()
out_all = survplot( x = msm_model, km = TRUE, out = "all")
```
Expand All @@ -446,7 +446,7 @@ prevalences using `prevalence.msm()` function. This produces a named list which
will be used inside `prevplot()`. For instance, running the following code
builds a plot of prevalences for each state of the model.

```{r prev, collapse = TRUE, fig.align = 'center', fig.width = 7, fig.height = 3}
```{r prev, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=6, fig.fullwidth = TRUE}
# defining the times at which compute the prevalences
t_min = min( hosp_augmented$augmented_int )
t_max = max( hosp_augmented$augmented_int )
Expand All @@ -468,10 +468,10 @@ It is also possible to plot the following statistic:
$$
M = \frac{(O_{is} - E_{is})^2} {E_{is}}
$$
which gives an idea of the deviance from the Markov model. This is computed
This gives an idea of the deviance from the Markov model and is computed
according to Titman and Sharples (2008). The following code addresses this request.

```{r plot_M, collapse = TRUE, fig.align = 'center', fig.width = 7, fig.height = 3, warning = F}
```{r plot_M, collapse = TRUE, fig.align = 'center', fig.width=7, fig.height=9, fig.fullwidth = TRUE, warning = F}
gof = prevplot( x = msm_model, prev.obj = prev, exacttimes = TRUE, M = TRUE, ci = TRUE )
```

Expand Down

0 comments on commit 6788523

Please sign in to comment.