pmxpartab | R Documentation |
Generate an formatted HTML table of parameter estimates
pmxpartab( parframe, columns = c(est = "Estimate", rse = "RSE%", ci95 = "95% CI", shrinkage = "Shrinkage"), sections = !is.null(parframe$type), section.labels = c(Structural = "Typical Values", CovariateEffect = "Covariate Effects", RUV = "Residual Error", IIV = "Between Subject Variability", IOV = "Inter-Occasion Variability"), footnote = NULL, show.fixed.to.zero = FALSE, merge.units = TRUE, na = "-", digits = 3 )
parframe |
A |
columns |
A named |
sections |
A |
section.labels |
A named |
footnote |
A |
show.fixed.to.zero |
A |
merge.units |
A |
na |
A |
digits |
Number of significant digits to include in the formatted table. |
An object of class "pmxpartab"
. This is essentially just an HTML
character string that displays in the default web browser or viewer when
printed (as per htmltools::print.html()
).
pmxparframe
outputs <- list( est = list( th = list(CL = 0.482334, VC = 0.0592686), om = list(nCL = 0.315414, nVC = 0.536025), sg = list(ERRP = 0.0508497)), se = list( th = list(CL = 0.0138646, VC = 0.00555121), om = list(nCL = 0.0188891, nVC = 0.0900352), sg = list(ERRP = 0.00182851)), fixed = list( th = list(CL = FALSE, VC = FALSE), om = list(nCL = FALSE, nVC = FALSE), sg = list(ERRP = FALSE)), shrinkage = list(nCL = 9.54556, nVC = 47.8771)) meta <- list( parameters = list( list(name="CL", label="Clearance", units="L/h", type="Structural"), list(name="VC", label="Volume", units="L", type="Structural", trans="exp"), list(name="nCL", label="On Clearance", type="IIV", trans="SD (CV%)"), list(name="nVC", label="On Volume", type="IIV"), list(name="ERRP", label="Proportional Error", units="%", type="RUV", trans="%"))) pmxpartab(pmxparframe(outputs, meta), columns=c(est="Estimate", rse="RSE%", ci95="95% CI", shrinkage="Shrinkage"), footnote="CI=confidence interval; RSE=relative standard error.") # An example using a Cox model, where we construct the parframe manually: library(survival) cph.fit <- coxph(Surv(time, status) ~ ph.ecog + age, data=lung) parframe <- with(summary(cph.fit), data.frame( name = c("ph.ecog", "age"), label = c("ECOG performance score", "Age"), est = coefficients[,"exp(coef)"], pval = coefficients[,"Pr(>|z|)"], lci95 = conf.int[,"lower .95"], uci95 = conf.int[,"upper .95"] )) pmxpartab(parframe=parframe, columns=c(est="HR", ci95="95% CI", pval="P-Value"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.