Learn R Programming

⚠️There's a newer version (1.8.157) of this package.Take me there.

rockchalk (version 1.8.86)

Regression Estimation and Presentation

Description

A collection of functions for ease of presentation and interpretation of regression analysis. These functions are used to produce the statistics lectures in http://pj.freefaculty.org/guides. There are functions to explore the effect (or lack thereof) from "mean centering," "residual centering", and standardization. The vignette "rockchalk" offers a fairly comprehensive overview. The vignette "Rstyle" has advice about coding in R. See the outreg function for a convenient way to generate regression models for reports. For nice, easy to use pictures, see plotSlopes, plotCurves, plotPlane. The package title "rockchalk" refers to our school motto, "Rock Chalk Jayhawk, Go K.U.".

Copy Link

Version

Install

install.packages('rockchalk')

Monthly Downloads

13,676

Version

1.8.86

License

GPL (>= 3.0)

Maintainer

Paul Johnson

Last Published

August 13th, 2014

Functions in rockchalk (1.8.86)

centralValues

Central Tendency estimates for variables
mvrnorm

Minor revision of mvrnorm (from MASS) to facilitate replication
mcGraph2

mcGraph2 draws a 3-D representation of a scatterplot with shadows in the x1-x2 plane.
getVIF

Converts the R-square to the variance inflation factor
outreg0

Creates a publication quality result table for regression models. outreg0 is the last version in the last development stream.
newdata

Create a newdata frame for usage in predict methods
plotFancy

Regression plots with predicted value lines, confidence intervals, color coded interactions
summary.factor

Tabulates observed values and calculates entropy
getDeltaRsquare

Calculates the delta R-squares, also known as squared semi-partial correlation coefficients.
getPartialCor

Calculates partial correlation coefficients after retrieving data matrix froma fitted regression model
model.data.default

Create a data frame suitable for estimating a model
getFocal

Select focal values from an observed variable.
outreg2HTML

Convert LaTeX output from outreg to HTML markup
print.factorSummaries

Prints out the contents of an object created by summarizeFactors in the style of base::summary
vech2mat

Convert a half-vector (vech) into a matrix.
getFocal.factor

Select focal values from factor variables.
mcDiagnose

Multi-collinearity diagnostics
mcGraph3

mcGraph3 draws a 3-dimensional scatter and a regression plane
predictOMatic

Create predicted values after choosing values of predictors. Can demonstrate marginal effects of the predictor variables.
addLines

Superimpose regression lines on a plotted plane
checkIntFormat

A way of checking if a string is a valid file name.
cutBySD

Returns center values of x, the mean, mean-std.dev, mean+std.dev
makeSymmetric

Create Symmetric Matrices, possibly covariance or correlation matrices, or check a matrix for symmetry and serviceability.
mcGraph1

Illustrate the effect of multicollinearity in regression.
summarize

Sorts numeric from factor variables and returns separate summaries for those types of variables.
testSlopes

Hypothesis tests for Simple Slopes Objects
focalVals

Create a focal value vector.
rockchalk-package

Miscellaneous regression functions
lazyCor

Create correlation matrices.
vech2Corr

Convert the vech (column of strictly lower trianglar values from a matrix) into a correlation matrix.
genCorrelatedData

Generates a data frame for regression analysis
lmAuxiliary

Estimate leave-one-variable-out regressions
magRange

magRange Magnify the range of a variable.
padW0

Pad with 0's.
plotPlane

Draw a 3-D regression plot for two predictors from any linear or nonlinear lm or glm object
plotSlopes

Generic function for plotting regressions and interaction effects
cutByQuantile

Calculates the "center" quantiles, always including the median, when n is odd.
formatVC

formatter for merMod objects copied from lme4
cutByTable

Select most frequently occurring values from numeric or categorical variables.
getFocal.default

Select focal values from a numeric variable
makeVec

makeVec for checking or creating vectors
religioncrime

Religious beliefs and crime rates
predictCI

Calculate a predicted value matrix (fit, lwr, upr) for a regression, either lm or glm, on either link or response scale.
plotSeq

Create sequences for plotting
residualCenter

Calculates a "residual-centered" interaction regression.
standardize

Estimate standardized regression coefficients for all variables
combineLevels

recode a factor by "combining" levels
centerNumerics

Find numeric columns, center them, re-name them, and join them with the original data.
checkPosDef

Check a matrix for positive definitness
lazyCov

Create covariance matrix from correlation and standard deviation information
genCorrelatedData2

Generates a data frame for regression analysis.
meanCenter

meanCenter
plot.testSlopes

Plot testSlopes objects
summarizeFactors

Extracts non-numeric variables, calculates summary information, including entropy as a diversity indicator.
summarizeNumerics

Extracts numeric variables and presents an alphabetized summary in a workable format.
plotCurves

Assists creation of predicted value curves for regression models.
cheating

Cheating and Looting in Japanese Electoral Politics
getAuxRsq

retrieves estimates of the coefficient of determination from a list of regressions
outreg

Creates a publication quality result table for regression models. Works with models fitted with lm, glm, as well as lme4.
model.data

Create a "raw" (UNTRANSFORMED) data frame equivalent to the input data that would be required to fit the given model.
perspEmpty

perspEmpty