Senator William McMaster Professor of Social Statistics, Department of Sociology, McMaster University, Hamilton, Ontario, Canada
- sem: Structural Equation Models update 2011-11-23 John Fox and Jarrett Byrnes, with contributions from Michael Culbertson, Michael Friendly, Adam Kramer, and Georges Monette.
- This package contains functions for fitting general linear structural equation models (with observed and unobserved variables) by the method of maximum likelihood using the RAM approach, and for fitting structural equations in observed-variable models by two-stage least squares.
- http://cran.r-project.org/web/views/SocialSciences.html 2011-11 John Fox at McMaster
- http://cran.r-project.org/web/views/Econometrics.html 2011-11 Achim.Zeileis at R-project.org
- http://cran.r-project.org/web/views/Psychometrics.html 2011-11 Patrick Mair@(at)wu.ac.at and Reinhold Hatzinger
- http://cran.r-project.org/web/views/Multivariate.html 2011-11-18 Paul.Hewson at plymouth.ac.uk
Fox, John. 2006. Structural Equation Modeling with the sem Package in R. Structural Equation Modeling 13(3): 465–486. http://socserv.socsci.mcmaster.ca/jfox/Misc/sem/SEM-paper.pdf
- http://rss.acs.unt.edu/Rdoc/library/sem/html/Klein.html data(Klein) on the U. S. Economy
- http://socserv.socsci.mcmaster.ca/jfox/Courses/R-course/index.html Introduction to the R Statistical Computing Environment
- http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/appendix.html R companion
Fox, John. 2008. Structural equation models (SEM) web page
http://jeromyanglim.blogspot.com/. 2009. Structural equation Models(SEM) from John Fox on 2009-12 ...
- Fox, John. 2010/11/20 Package 'sem.' <-------------2010 supercedes 2009--------------- this is the key reference, with example
- Fox, John. 2009. The sem Package in R. <-------------2009--------------- this is the key reference, with examples
- path diagram graph-drawing program dot Wikipedia:DOT language; Wikipedia:Graphviz NOT WORKING LOOKS OBSOLETE see Drawing Graphs with dot Koutsofios and North (2002)
- Drawing graphs with dot. http://www.graphviz. org/Documentation/dotguide.pdf
- http://personality-project.org/r/r.sem.html Structural Equation Modeling in R
- http://www.personality-project.org/r/ has other links
- http://personality-project.org/revelle/syllabi/454/454.syllabus.pdf Revelle
- The sem package developed by John Fox uses the RAM path notation of Jack McCardle and is fairly straightforward. The examples in the package are quite straightforward. A text book, such as John Loehlin's Latent Variable Models (4th Edition) is helpful in understanding the algorithm.
Fox, John. 2010. The R Commander: A Basic Statistical GUI for R. paper: Journal of Statistical Software September 2005, Volume 14, Issue 9.
- Abstract: Unlike S-PLUS, R does not incorporate a statistical graphical user interface (GUI), but it does include tools for building GUIs. Based on the tcltk package (which furnishes an interface to the Tcl/Tk GUI toolkit), the Rcmdr package provides a basic-statistics graphical user interface to R called the "R Commander." The design objectives of the R Commander were as follows: to support, through an easy-to-use, extensible, cross-platform GUI, the statistical functionality required for a basic-statistics course (though its current functionality has grown to include support for linear and generalized-linear models, and other more advanced features); to make it relatively difficult to do unreasonable things; and to render visible the relationship between choices made in the GUI and the R commands that they generate. The R Commander uses a simple and familiar menu/dialog-box interface. Top-level menus include File, Edit, Data, Statistics, Graphs, Models, Distributions, Tools, and Help, with the complete menu tree given in the paper. Each dialog box includes a Help button, which leads to a relevant help page. Menu and dialog-box selections generate R commands, which are recorded in a script window and are echoed, along with output, to an output window. The script window also provides the ability to edit, enter, and re-execute commands. Error messages, warnings, and some other information appear in a separate messages window. Data sets in the R Commander are simply R data frames, and can be read from attached packages or imported from files. Although several data frames may reside in memory, only one is "active" at any given time. There may also be an active statistical model (e.g., an R lm or glm ob ject). The purpose of this paper is to introduce and describe the use of the R Commander GUI; to describe the design and development of the R Commander; and to explain how the R Commander GUI can be extended. The second part of the paper (following a brief introduction) can serve as an introductory guide for students who will use the R Commander. Current Version
Fox, John. 2002. An R and S-Plus Companion to Applied Regression. Thousand Oaks, CA: Sage Publications
Fox, John. 2009. Web appendix to An R and S-PLUS Companion to Applied Regression.
- Bootstrapping Regression Models Appendix to An R and S-PLUS Companion to Applied Regression John Fox January 2002
- 2002 [http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-robust-regression.pdf Robust Regression:
Appendix to An R and S-PLUS Companion to Applied Regression]
Fox, John. 2009. Chapter 6, 6.1, Robust Regression Can be extremely valuable "when the error distribution is not normal, particularly when the errors are heavy-tailed."
Can we pass out lm.restricted and the equivalent of row.names(sccs)? lm.restricted <- lm(restrict_eq,data=dataset) reason: I want to do a qq.plot (car): According to John Fox p193 qqplot(lm.restricted, simulate.T, labels=row.names(sccs))
Another approach, termed robust regression, is to employ a fitting criterion that is not as vulnerable as least squares to unusual data. The most common general method of robust regression is M-estimation, introduced by Huber (1964).
Huber, P. J. 1964. Robust Estimation of a Location Parameter. Annals of Mathematical Statistics 35:73-101.
Davison, A. C. & D. V. Hinkley. 1997. Bootstrap Methods and their Application. Cambridge: Cambridge University Press.
Reticular action model (RAM)
Fox (2009:474): "the sem function, which is used to fit general structural equation models in R, employs the recticular action model (RAM) formulation of the model, due to McArdle (1980) and McArdle and McDonald (1984), and it is therefore helpful to understand the structure of this model; the notation used here is from McDonald and Hartmann (1992).
In the RAM model, the vector v contains indicator variables, directly observed exogenous variables, and latent exogenous and endogenous variables; the vector u (which may overlap with v) contains directly observed and latent exogenous vari- ables, measurement-error variables, and structural-error variables (i.e., the inputs to the system). Not all classes of variables are present in every model; for example, there are no directly observed exogenous variables in the Wheaton model. The v and u vectors are related by the equation v Av u, and, therefore, the matrix A contains regression coefficients (both structural parameters and factor loadings)."
- McArdle, J. J. (1980). Causal modeling applied to psychonomic systems simulation. Behavior Research Methods and Instrumentation, 12, 193–209.
McArdle, J. J., & Epstein, D. (1987). Latent growth curves within developmental structural equation models. Child Development, 58, 110–133.
- See Fox p474 fn 3: "A model with intercepts can be estimated by the sem function (described later) using a raw (i.e., uncorrected) moment matrix of mean sums of squares and cross-products in place of the covariance matrix among the observed variables in the model. This matrix includes sums of squares and products with a vector of ones, representing the constant regressor (see, e.g., McArdle & Epstein, 1987). The raw.moments function in the sem package will compute a raw-moments matrix from a model formula, numeric data frame, or numeric data matrix. To get correct degrees of freedom, set the argument raw = TRUE in sem."
- McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the reticular action model. British Journal of Mathematical and Statistical Psychology, 37, 234–251.
- McDonald, R. P., & Hartmann, W. M. (1992). A procedure for obtaining initial values of parameters in the RAM model. Multivariate Behavioral Research, 27, 57–76.
- Abstract An algorithm for obtaining initial values for the minimization process in covariance structure analysis is developed that is more generally applicable for computing parameters connected to latent variables than the currently existing ones. The algorithm is formulated in terms of the RAM model but can be easily extended to model specifications used in other structural equation programs (e.g., LISREL, Joreskog & Sorbom, 1988, or EQS, Bentler, 1989).