notefunctions: Table notes

Description Usage Arguments Details Value Author(s) Examples

Description

Prepare notes about standard errors and statistical significance

Usage

1
2
se.note(env)
stars.note(env)

Arguments

env

The environment of the apsrtable() call, because note functions may need to make use of some variables such as lev or digits.

Details

Table notes are part of the tabular environment and may be based on the content of the table itself. For example, the stars argument to apsrtable determines whether one or many levels of statistical significance are indicated in the output. The stars.note function creates text to place in such a note.

By default the output uses the notation * p <.05 and the example below shows a replacement function that states, “significant at lev percent.”.

To access variables in the call to apsrtable from functions in notes, include the arugment env in any custom functions. This is the apsrtable call environment.

Remember, to escape characters in Latex output, backslashes have to be doubled in R character strings.

Value

A character string to place within the tabular environment in footnotesize beneath other output.

Author(s)

Michael Malecki <malecki at wustl.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### Custom note function

signif.pct <- function(env) {
  paste("$^*$ significant at", evalq(lev,envir=env)*100, "percent")
}
### Continue the example from apsrtable
## Not run: 
apsrtable(lm.D90, lm.D9, glm.D9, digits=1, align="left",
          stars=1, lev=0.05, model.counter=0, order="rl",
          notes=list(se.note, signif.pct, 
            "Plant weight data from the lm() example" )
	 )

## End(Not run)

apsrtable documentation built on May 2, 2019, 5:20 a.m.