install.packages("multilevel", repos="http://lib.stat.cmu.edu/R/CRAN")

 

Tools for making Latex tables in R

 

http://stackoverflow.com/questions/5465314/tools-for-making-latex-tables-in-r

 

GLMER Latex

 

1.       http://cran.r-project.org/web/packages/memisc/memisc.pdf

·         mtable()

·         toLatex()

 

2.       http://hlplab.wordpress.com/2010/06/15/r-code-for-latex-tables-of-lmer-model-effects/

 

3.       https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q1/005564.html

 

Tables adapted from “Applied Econometrics with R” by Kleiber and Zeileis.

Table 3.1:  Generic  functions for fitted (linear) model objects.

Function

Description

print()

simple printed display

summary()

standard regression  output

coef()

(or coefficients()) extracting the regression  coefficients

residuals()

(or resid())  extracting residuals

fitted()

(or fitted.values()) extracting fitted values

anova()

comparison of nested  models (see 11.24 “R Cookbook” for example); see p. 65 Kleiber for linear.hypothesis(); finally, see p. 69 Kleiber for anova() example.

predict()

predictions for new data

plot()

diagnostic plots

confint()

confidence  intervals for the regression  coefficients

deviance()

residual sum of squares

vcov()

(estimated) variance-covariance matrix

logLik()

log-likelihood  (assuming normally distributed errors)

AIC()

information  criteria  including   AIC,  BIC/SBC  (assuming normally distributed errors)

 


 

Table 2.1:  A selective list of arguments to par().

Argument

Description

axes

should  axes be drawn?

bg

background color

cex

size of a point or symbol

col

color

las

orientation of axis labels

lty, lwd

line type and  line width

main, sub

title and  subtitle

mar

size of margins

mfcol, mfrow

array  defining  layout for several  graphs  on a plot

pch

plotting symbol

type

types (see text)

xlab, ylab

axis labels

xlim, ylim

axis ranges

xlog, ylog, log

logarithmic scales

 


 

Table 3.2:  Specification of interactions in formulas.

Formula

Description

y ~ a + x

Model  without  interaction:  identical  slopes  with  respect to x but different intercepts with respect to a.

y ~ a * x
y ~ a + x + a:x

Model with interaction: the term a:x gives the difference in slopes compared with the reference  category.

y ~ a / x
y ~ a + x %in% a

Model with interaction: produces the same fitted values  as the model above but using a nested  coefficient coding.  An explicit slope estimate is computed for each category in a [Kleiber]. 

Terms of the form a/x, where a is a factor, are best thought of as “separate regression models of type 1 + x within the levels of a.” [Venables].

y ~ (a + b + c)^2
y ~ a*b*c - a:b:c

Model with all two-way interactions (excluding the three- way interaction).

 


 

Table 5.2:  Further packages  for microeconometrics.

Package

Description

gam

Generalized additive models  (Hastie 2006)

lme4

Nonlinear random-effects  models:  counts,  binary  depen- dent variables, etc.  (Bates 2008)

mgcv

Generalized additive (mixed) models  (Wood  2006)

micEcon

Demand systems, cost  and  production  functions  (Henningsen  2008)

mlogit

Multinomial  logit  models  with  choice-specific  variables (Croissant 2008)

robustbase

Robust/resistant regression  for  GLMs (Maechler, Rousseeuw,   Croux,   TodorovRuckstuhl,  and  Salibian-  Barrera 2007)

sampleSelection

Selection  models:  generalized tobit, heckit  (Toomet  and Henningsen 2008)