Learn R Programming

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

rockchalk (version 1.8.0)

Regression Estimation and Presentation

Description

A collection of functions for ease of presentation and interpretation of regression analysis. These functions are developed in response to student requests that have arisen in our regression course. For regression diagnostics, see mcDiagnose, getDeltaRsquare, meanCenter or residualCenter. See the outreg function for a way to generate LaTeX tables of regression models. For nice, easy to use pictures, see plotSlopes, plotCurves, plotPlane for graphs. There are some functions for re-organization of data, especially useful might be combineLevels for re-coding factors. The vignette "rockchalk" offers a fairly broad survey. The package title "rockchalk" refers to the expression, "Rock Chalk Jayhawk, Go K.U.".

Copy Link

Version

Install

install.packages('rockchalk')

Monthly Downloads

13,676

Version

1.8.0

License

GPL (>= 3.0)

Maintainer

Paul Johnson

Last Published

July 30th, 2013

Functions in rockchalk (1.8.0)

mcDiagnose

Multi-collinearity diagnostics
cheating

Cheating and Looting in Japanese Electoral Politics
combineLevels

recode a factor by "combining" levels
lazyCov

Create covariance matrix from correlation and standard deviation information
model.data

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

Regression plots with predicted value lines, confidence intervals, color coded interactions
plotSlopes

Generic function for plotting regressions and interaction effects
rockchalk-package

Miscellaneous regression functions
predictOMatic

predictOMatic creates predicted values for a fitted regression model. This demonstrates marginal effects of the predictor variables.
perspEmpty

perspEmpty
makeSymmetric

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

makeVec for checking or creating vectors
checkPosDef

Check a matrix for positive definitness
getVIF

Converts the R-square to the variance inflation factor
genCorrelatedData2

Generates a data frame for regression analysis.
getFocal.factor

Select focal values from factor variables.
outreg0

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

Religious beliefs and crime rates
standardize

Estimate standardized regression coefficients for all variables
genCorrelatedData

Generates a data frame for regression analysis
lazyCor

Create correlation matrices.
lmAuxiliary

Estimate leave-one-variable-out regressions
mvrnorm

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

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

Creates a publication quality result table for regression models.
cutByQuantile

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

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

Sorts numeric from factor variables and returns separate summaries for those types of variables.
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.
getFocal.default

Select focal values from a numeric variable
getDeltaRsquare

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

Convert a half-vector (vech) into a matrix.
testSlopes

Hypothesis tests for Simple Slopes Objects
centerNumerics

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

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

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

Calculates a "residual-centered" interaction regression.
summary.factor

Tabulates observed values and calculates entropy
vech2Corr

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

Create a focal value vector.
getAuxRsq

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

magRange Magnify the range of a variable.
centralValues

Central Tendency estimates for variables
outreg2HTML

Convert an outreg result to HTML markup
plotCurves

Assists creation of predicted value curves for regression models.
plotPlane

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

Illustrate the effect of multicollinearity in regression.
getPartialCor

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

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

Select focal values from an observed variable.
addLines

Superimpose regression lines on a plotted plane
newdata

Creates the newdata frame required in predict methods.
cutBySD

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

meanCenter
plotSeq

Create sequences for plotting