Learn R Programming

sigr (version 1.1.5)

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
)

Value

formatted string and fields

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")

Examples

Run this code

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