fit.1ln.rprt: Report a model fit in a single line of text output

View source: R/reporting.R

fit.1ln.rprtR Documentation

Report a model fit in a single line of text output

Description

This function takes a fit multivariate regression model as input and converts the normal tabular output into a single line using repeated "+"or"-" symbols for significance

Usage

fit.1ln.rprt(fit, method=c('std.dev','p-value')[1], decimal.places=3, 
             name.char.len=6, print.inline=TRUE, rtrn.line=FALSE, R2AIC=TRUE,mn='')

Arguments

fit

a fit model

method

how to calculate the number of pluses or minuses before each coefficient name (default is standard deviations)

decimal.places

the number of decimal places to use in reporting p-values

name.char.len

the maximum length to use when truncating variable names

R2AIC

boolean for also returning/printing AIC and R^2 values

print.inline

should the outout string be printed to the terminal?

rtrn.line

should the output string be returned as a characters string?

mn

model number prefixed to printout if 'print.inline' is TRUE

Value

A character string of the form "++var1 +var5 var3 | -var2 –var4" indicating signifcance and direction of regression results

Examples


path <- system.file("extdata","primate-example.data.csv", package="mmodely")
data <- read.csv(path, row.names=1)

model.fit <- lm('OC ~ mass.Kg + group.size + arboreal + leap.pct', data=data)

fit.1ln.rprt(fit=model.fit, decimal.places=3, name.char.len=6, print.inline=TRUE, rtrn.line=FALSE)


mmodely documentation built on May 31, 2023, 6:47 p.m.