Learn R Programming

pubprint (version 0.2.1)

style.apa.summary.lm.model: Formats the summary of a Linear Model Fit (model statistics)

Description

This style functions takes the summary of a linear model fit from lm and transforms it into a formatted character vector. It prints the model statistics.

Usage

style.apa.summary.lm.model(x, r.squared = c("normal", "adjusted"))

Arguments

x
a list. First item must be the summary of a linear model fit from lm. All other list items will be ignored.
r.squared
a character. This argument selects whether the normal or the adjusted R squared is printed.

Value

character vector with a formatted character vector.

Details

Please note that this is a internal style function. It is called from pprint and not exported to user namespace. Usually pprint determines the correct style function automatically, but you can define the style function by using the format argument of pprint (pass the name of this function without style.apa. prefix). Additionally you can pass the arguments listed in this documentation to pprint.

Argument x of this function expects a list. Be aware that you do not have to pass a list to pprint or pull.pubprint -- these functions will convert your arguments. This is only necessary if you want to pass additionally information to the internal style functions (see vignette for examples).

See Also

lm

Other APA.style.functions: style.apa.anova, style.apa.bartlett, style.apa.character, style.apa.chisq, style.apa.cor.test, style.apa.df, style.apa.fisher, style.apa.ks, style.apa.numeric, style.apa.p.value, style.apa.shapiro, style.apa.summary.aovlist, style.apa.summary.lm.beta.coeff, style.apa.summary.lm.coeff, style.apa.summary.lm.equation, style.apa.t.test

Examples

Run this code
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2, 10, 20, labels = c("Ctl","Trt"))
weight <- c(ctl, trt)
lm.D9 <- lm(weight ~ group)
pprint(summary(lm.D9),
       format = "summary.lm.model")

Run the code above in your browser using DataLab