fit.1ln.rprt | R Documentation |
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
fit.1ln.rprt(fit, method=c('std.dev','p-value')[1], decimal.places=3,
name.char.len=6, print.inline=TRUE, rtrn.line=FALSE, R2=TRUE,mn='')
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 |
R2 |
boolean for also returning/printing 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 |
A character string of the form "++var1 +var5 var3 | -var2 –var4" indicating signifcance and direction of regression results
# Motor Trend car data
fit.1ln.rprt(lm('mpg ~ cyl + hp + wt + gear + disp', data=mtcars))
# Tooth Growth data
fit.1ln.rprt(lm('len ~ dose + supp', data=ToothGrowth))
# Earthquake attenuation data
fit.1ln.rprt(lm('accel ~ dist + mag', data=attenu))
# Fertility data
fit.1ln.rprt(lm('parity ~ age + education + spontaneous + induced', data=infert), name.char.len=18)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.