Learn R Programming

sigr (version 1.1.0)

wrapFTest.data.frame: Wrap quality statistic of identity relation from data.

Description

Wrap quality statistic of identity relation from data.

Usage

# S3 method for data.frame
wrapFTest(
  x,
  predictionColumnName,
  yColumnName,
  nParameters = 1,
  meany = mean(x[[yColumnName]]),
  ...,
  na.rm = FALSE,
  format = NULL,
  pLargeCutoff = 0.05,
  pSmallCutoff = 1e-05
)

Arguments

x

data frame containing columns to compare

predictionColumnName

character name of prediction column

yColumnName

character name of column containing dependent variable

nParameters

number of variables in model

meany

(optional) mean of y

...

extra arguments (not used)

na.rm

logical, if TRUE remove NA values

format

if set the format to return ("html", "latex", "markdown", "ascii", "docx")

pLargeCutoff

value to declare non-significance at or above.

pSmallCutoff

smallest value to print

Value

formatted string and fields

Examples

Run this code
# NOT RUN {
d <- data.frame(x=c(1,2,3,4,5,6,7,7),
                y=c(1,1,2,2,3,3,4,4))
model <- lm(y~x,data=d)
summary(model)
d$pred <- predict(model,newdata=d)
sigr::wrapFTest(d,'pred','y')

# }

Run the code above in your browser using DataLab