From 5c554944feec54d322f95835618b3cbff0caff81 Mon Sep 17 00:00:00 2001 From: Philip Delff Date: Mon, 26 Aug 2024 11:35:24 -0400 Subject: [PATCH] documentation details --- .Rbuildignore | 2 ++ DESCRIPTION | 2 +- NEWS.md | 34 ++++++++++++++++++---------------- man/prettyMatLines.Rd | 24 ++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 man/prettyMatLines.Rd diff --git a/.Rbuildignore b/.Rbuildignore index 35b2666a..601b31ae 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -52,6 +52,8 @@ LINK.LNK ^inst/examples/nonmem/.*\.msf ^inst/examples/simulations/.+ ^inst/examples/R/NMexec_run_estimates.R +;; so far, there is nothing of real value here +^inst/examples/R/* ^vignettes$ .*_dir.* ^R/NMwritePreamble.R diff --git a/DESCRIPTION b/DESCRIPTION index c2e121f0..00664c97 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,7 +12,7 @@ Roxygen: list(roclets=c("collate", "namespace", "rd", "vignette")) Depends: R (>= 3.5.0) Imports: data.table, - NMdata (>= 0.1.5), + NMdata (>= 0.1.6), R.utils, MASS, fst, diff --git a/NEWS.md b/NEWS.md index 9f9f673a..e5d54d8c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,27 +3,29 @@ ## New features * `NMsim()` -- New simulation method `NMsim_NWPRI()` to simulate with parameter + + - New simulation method `NMsim_NWPRI()` to simulate with parameter uncertainty. This automates simulation with parameter uncertainty using Nonmem's `NWPRI` subroutine for models with a successful - covariance step. For now this method only works for `THETA` since - we have found that the parameter distributions sampled for - `OMEGA` and `SIGMA` do not always match the model estimates and - therefore cannot be trusted. To ensure that only `THETA` are - sampled and simulated, this method should only be run using the - `typical=TRUE` argument. This method is much faster - than the existing methods in NMsim for simulation with parameter - uncertainty (`NMsim_VarCov()`). This method depends on `NMdata` - version 0.1.7 or greater. Big thanks to Brian Reilly for his - excellent work on this important contribution. - -* The `add()` function to be used in `NMsim()`'s `modify.model` + covariance step. For now this method only works for `THETA` since we + have found that the parameter distributions sampled for `OMEGA` and + `SIGMA` do not always match the model estimates and therefore cannot + be trusted. To ensure that only `THETA` are sampled and simulated, + this method should only be run using the `typical=TRUE` + argument. This method is much faster than the existing methods in + NMsim for simulation with parameter uncertainty + (`NMsim_VarCov()`). This method depends on `NMdata` version 0.1.7 or + greater. Big thanks to Brian Reilly for his excellent work on this + important contribution. + + - The `add()` function to be used in `NMsim()`'s `modify.model` argument now supports prepending and appending of text lines to control stream sections. The default is still to append and `add("text",.pos="top")` will now prepend "text". * `NMexec()` -- A "cleaning" feature has been added to `NMexec()`, removing some of + + - A "cleaning" feature has been added to `NMexec()`, removing some of the temporary files generated by Nonmem after ended execution. The interface is inspired by PSN's `clean` argument supporting values 0 (no cleaning), 1-4 (quite some cleaning - so far no difference @@ -32,13 +34,13 @@ execute passing on the `clean` value. -- Default number of cores to be used by `NMexec()` can be controlled + - Default number of cores to be used by `NMexec()` can be controlled using `NMdataConf(nc=N)` where `N` is the desired default. Notice, `NMsim()` will not use this default. This is because parallellization is not as commonly used in simulation as in estimation. -- A useful backup feature has been added. Before execution, any + - A useful backup feature has been added. Before execution, any existing results files related to a model are by default moved to a backup folder. The backup files are not diff --git a/man/prettyMatLines.Rd b/man/prettyMatLines.Rd new file mode 100644 index 00000000..1e87950e --- /dev/null +++ b/man/prettyMatLines.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/prettyMatLines.R +\name{prettyMatLines} +\alias{prettyMatLines} +\title{Print OMEGA and SIGMA matrices for NONMEM sections in block format. +Note: This function currently only works with fixed blocks as in + the NMsim_NWPRI functionality for printing $THETAPV.} +\usage{ +prettyMatLines(block_mat_string) +} +\arguments{ +\item{block_mat_string}{Output of NMsim::NMcreateMatLines. This is a string of +OMEGA/SIGMA estimates that will be wrapped onto multiple lines for ease of +reading in NONMEM control streams.} +} +\value{ +Character vector +} +\description{ +Print OMEGA and SIGMA matrices for NONMEM sections in block format. +Note: This function currently only works with fixed blocks as in + the NMsim_NWPRI functionality for printing $THETAPV. +} +\keyword{internal}