\documentclass[10pt]{article}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}

\usepackage[authoryear,round]{natbib}  %use this one but 
\bibliographystyle{apa}   %this one plus author year seems to work?

%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
%\usepackage{amssymb}
\usepackage{epstopdf}

%\usepackage[ae,hyper]{Rd}
%\usepackage{a4wide}
\usepackage[usenames]{color}
\usepackage{setspace}

\usepackage[colorlinks=true,citecolor=blue]{hyperref}  %this makes reference links hyperlinks in pdf!
\usepackage{hyperref}
\newcommand{\wrc}[1]{\marginpar{\textcolor{blue}{#1}}}   %bill's comments
\newcommand{\wra}[1]{\textcolor{blue}{#1}}   %bill's additions
\newcommand{\jwc}[1]{\marginpar{\textcolor{red}{#1}}}    %Josh's comments    
\newcommand{\jwa}[1]{\textcolor{red}{#1}}   %josh's additions
%
% To count the words in the text, convert to doc mode, select what is to be counted and then issue the command
%     pbpaste | wc -w     in X11 window
%

\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
\let\proglang=\textsf
\newcommand{\R}{\proglang{R}}
%\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
\newcommand{\Rfunction}[1]{{\texttt{#1}}} 
\newcommand{\fun}[1]{{\texttt{#1}\index{#1}\index{R function!#1}}}
\newcommand{\pfun}[1]{{\texttt{#1}\index{#1}\index{R function!#1}\index{R function!psych package!#1}}}\newcommand{\Rc}[1]{{\texttt{#1}}}    %R command  same as Robject
\newcommand{\Robject}[1]{{\texttt{#1}}} 
\newcommand{\Rpkg}[1]{{\textit{#1}\index{#1}\index{R package!#1}}}   %different from pkg  - which is better?
\newcommand{\iemph}[1]{{\emph{#1}\index{#1}}} 
\newcommand{\vect}[1]{\boldsymbol{#1}}



\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\title{Psychology 454: Psychological Measurement\\
An introduction to latent variable modeling}
\author{\href{http://personality-project.org/revelle.html}{William Revelle}
\\Swift 315 
\\email: \href{mailto:revelle@northwestern.edu}{revelle@northwestern.edu}
}
%\date{}                                           % Activate to display a given date or no date

\begin{document}
\maketitle
\section{Objectives}
To understand the fundamental concepts in latent variable modeling in order to make you a better consumer and producer of latent variable models in your research.

To understand how to evaluate the quality of models when applied to data by understanding various sources of variabilty of goodness of fit tests.

To learn how to apply these concepts to real data sets using a variety of standard statistical packages (e.g., R, Mx, EQS, Lisrel, Prelis, Amos, MPlus)

\section{Text, readings, and requirements}
\subsection{Text}
Loehlin, J. C. Latent Variable Models (4th ed). Lawrence Erlbaum Associates, Mahwah, N.J. 2004

Revelle, W. (in preparation) An introduction to psychometric theory with applications in \R{}.  Springer. Draft chapters available at \href{http://personality-project.org/r/book}{http://personality-project.org/r/book}.

Revelle, W. (in preparation) Adventures in Latent Variable Modeling using \R{}. Draft chapters available at \href{http://personality-project.org/r/book}{http://personality-project.org/r/book}.

\nocite{Loehlin:04,revelle:intro,raykov:06,joreskog:99}

\subsection{Readings}
\indent Multiple web based readings including, but not limited to the ones listed in the references.  This list will be added to throughout the quarter.

Syllabus and handouts available at \href{http://personality-project.org/revelle/syllabi/454/454.syllabus.pdf}{http://personality-project.org/revelle/syllabi/454/454.syllabus.pdf}

\subsection{Requirements}
Some basic knowledge of psychometric theory (to be reviewed in week 1). This course is a natural sequel to \href{http://personality-project.org/revelle/syllabi/405.syllabus.html}{Psychology 405: Psychometric Theory}. Some of the web readings will be taken from the 405 syllabus.

Familiarity with linear (matrix) algebra (to be reviewed in week 1)

Willingness to use computer packages that allow for structural equation modeling. These can either be downloaded to your computer (e.g, the open source packages R, and Mx), run on the Social Science Computer Cluster (e.g., MPlus), or ones that you have a license for (e.g., EQS?)

Willingness to ask questions and add to the class discussion. 

As might be expected, most of my examples and lectures will make use of the powerful statistical system, \R{} \citep{R}.  This is because the open source nature of \R{} allows us to see  (if we want) how the calculations are actually done, and to add new features to existing packages.  We will use two packages a great deal.  The \R{} packages \Rpkg{psych} \citep{psych} and \Rpkg{lavaan} \citep{lavaan}.

\subsection{Evaluation} 

Homework assignments will be given weekly.  These are your benefit and will be graded on a completed, not completed basis.

Students will be expected to write a short paper demonstrating the use of structural equation techniques applied to their particular research interests. They will also be asked to present their use of latent variable models in short (15-30 minute) presentations in the last few weeks of the course.  

This is a hands on course.  You will be expected to try the various programs on simulated and real data sets.

\section{Outline (to be added to frequently -- keep checking)}
\begin{scriptsize}
\begin{tabular} { | c | c |c | c | c |} 
\hline
Week  &        Topic            &       Reading & Lecture Notes &   Homework \\ \hline
1 &\href{http://personality-project.org/revelle/syllabi/454/454.week1.pdf}{ Review} & Loehlin Chaper 1 & & Problem set 1 \\
    &  Correlation/Regression           &   \href{http://personality-project.org/r/book/chapter4.pdf}{Correlation/Regression}                                  &  \href{http://personality-project.org/revelle/syllabi/405/405.correlation.regression.pdf}{ Correlation and Regression  }                    & Exercises from Loehlin                      \\ 
    &Reliability           &  \href{http://www.personality-project.org/r/book/Chapter7.pdf}{ Reliability }                                  & \href{http://personality-project.org/r/}{Introduction to R}                   &      1-12 (page 32-34)                      \\ 
    &                                 &                                  &\href{http://personality-project.org/r/book/AppendixA}{Introduction to R -- appendix}               &  \\
       &             &   \href{http://personality-project.org/r/book/AppE.pdf}{Linear Algebra}                              &\href{http://personality-project.org/revelle/syllabi/454/matrixalgebra.pdf}{Linear Algebra}             &                            \\
         &              &                                &   \href{http://personality-project.org/r/sem.appendix.2.pdf}{inverse of a matrix}.               &                            \\
         &              &                                & Using  the \href{http://sscc.northwestern.edu/docs/statisticalsoftware.cfm}{SSCC}      & \\
 \hline


 2 &Basic Model fitting & Loehlin Chaper 2 & \href{http://personality-project.org/revelle/syllabi/454/454.pathdiagrams.pdf}{Path models}& Problem set 2 \\
   &                &                                                       &\href{http://personality-project.org/revelle/syllabi/454/454.wk2.pdf}{Week 2 slides }  &  \\
    &               &                                                       & Model fitting -- regression vs. latent variables \\
     &              &                                                      & \href{http://personality-project.org/revelle/syllabi/454/454.wk3.pdf}{regression/mediation/latent}           &           \\ \    &               &                                                       & Using R             &              \\ \hline
    
3 & Simple models& Loehlin Chapter 3 & OLS/WLS/MLE  & Problem set 3 \\
    &               &                                                      &   \href{http://personality-project.org/revelle/syllabi/454/454.regression.pdf}{Even more on regression}                          &   \\ 
      &               &                                                      &   \href{http://personality-project.org/revelle/syllabi/454/454.simulation.pdf}{Simulating structural data}.                          &   \\ 

    &              &                                                       &   \href{http://personality-project.org/revelle/syllabi/454/general.pdf}{A general factor of personality?}      &     \\  \hline

4 &Exploratory FA & Loehlin Chapter 5  &  \href{http://personality-project.org/revelle/syllabi/454/454.wk4.readdata.pdf}{EFA/CFA  -- psych, sem and lavaan}& Problem set 4 \\
    &               &  \href{http://personality-project.org/revelle/syllabi/454/sem.chap3.pdf}{Hierarchical factor models}                                                       &                            & \\ \hline

5 &EFA (continued) & Loehlin Chapter 6  & \href{http://personality-project.org/revelle/syllabi/454/sem.week5.pdf}{EFA/CFA continued} & Problem set 5 \\
    &               &    \href{http://personality-project.org/revelle/syllabi/454/454.goodness.pdf}{ Goodness of fit }                                             & \href{http://personality-project.org/revelle/syllabi/454/454.wk.5a.pdf}{items vs continuous measures}                  &\\
   &               &                                                   &  \href{http://personality-project.org/revelle/syllabi/454/454.irt.pdf}{Item Response Models}&\\ 
    &               &                                                   &  \href{http://personality-project.org/revelle/syllabi/454/sem.skew.pdf}{more on skew}&\\ 
    &               &                                                   &  \href{http://personality-project.org/revelle/syllabi/454/sem.change}{change} &   \\ 
     &               &                                                   &  \href{http://personality-project.org/revelle/syllabi/454/454.wk6.change.pdf}{and more on change}  &  \\    \hline
6 &CFA & Loehlin Chapter 4  &  \href{http://personality-project.org/revelle/syllabi/454/454.sem.cfa.pdf}{SEM = regression + reliability} & Problem set 6 \\
    &        &\href{http://personality-project.org/revelle/syllabi/454/marsh.10a.pdf}{one} good and one \href{http://personality-project.org/revelle/syllabi/454/erdle.10.pdf}{bad} example& How to define a model &\\
    &       &  of modeling complex structures  &  \href{http://personality-project.org/revelle/syllabi/454/454.wk7.critic.pdf}{analysis and critique}  & \\
    &  Multiple Groups            &    \href{http://personality-project.org/revelle/syllabi/454/sem.chap4.pdf}{R and LISREL models}                                                    &          \href{http://personality-project.org/revelle/syllabi/454/454.week6.lisrel.pdf}{R and LISREL models}              & \\ 
    &                                           & & \href{http://personality-project.org/revelle/syllabi/454/454.wk7.variables.pdf}{types of variables, types of models} & \\
    &					& &&\\\hline
    
7 &Goodness of Fit & Loehlin Chapter 7 &  & Problem set 7 \\
    &Evaluating Alternatives               &  \href{http://personality-project.org/revelle/syllabi/454/454.change.pdf}{More on change}                                                    &    \href{http://personality-project.org/revelle/syllabi/454/454.wk9.pdf}{Advanced modeling with Lavaan}                       &  \\ 
    &                                                  &latent change  \href{http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4259494/}{Ghisletta and McArdle, 2014} \\ \hline
8 & & Loehlin Chapter  &  & Problem set 8 \\
    &               &                                                       &                          &  \\ \hline


\end{tabular}

\end{scriptsize}
\section{Detailed Notes}
\subsection{Week 1}
	Introduction to latent variables (405 in a week).
	
	Review of  \href{http://personality-project.org/revelle/syllabi/405/405.correlation.regression.pdf}{ Correlation and Regression  }  and classical reliability theory.  See also  Chapter  4 on \href{http://personality-project.org/r/book/Chapter4.pdf}{Correlation and regression} as well as Chapter 5 on \href{ersonality-project.org/r/book/Chapter5.pdf}{multiple correlation and regression}. 
	
	Review of linear/matrix algebra (\href{http://personality-project.org/r/book/AppE.pdf}{Appendix E})
	

\subsection{Week 2 }
        Application of matrix algebra to pattern and structure.  \href{http://personality-project.org/r/book/Chapter6.pdf}{Chapter 6: Exploratory factor analysis} as a basic latent variable model. 
        Finding the \href{http://www.personality-project.org/r/book/A5.pdf}{inverse of a matrix}.  For a review of factor analysis, see \url{http://personality-project.org/revelle/syllabi/405/405-efa.pdf}.
        
   \subsection{Week 3 }
         Structural models and goodness of fit tests.  \cite{barrett:07},  Examples with simulated data.
         
         \href{http://personality-project.org/r/sem.simulation.pdf}{How to simulate structural data}.  This has been revised with a correction for two factor simulations and with a more extensive analysis of the effects of sample size on estimating parameters in the two factor model.
         
         Using basic sem programs to find structure and apply goodness of fit tests.  Using the \Rpkg{sem} \citep{sem} and \Rpkg{lavaan} \citep{lavaan} packages.
         
 \subsection{Week 4}
 \href{http://personality-project.org/r/sem.chap3.pdf}{Analysis of hierarchical factor models} using hierarchical and bifactor solutions.  The lecture notes for week 4 are \href{http://personality-project.org/revelle/syllabi/454/454.wk4.pdf}{here} and prior notes are \href{http://personality-project.org/revelle/syllabi/454/sem.wk4.pdf}{prior year notes}
 
 \subsection{Week 5}
Exploratory and confirmatory factor analysis, continued. The lecture notes for week 5 are \href{http://personality-project.org/revelle/syllabi/454/sem.week5.pdf}{here}. 

Considering issues of using items rather than continuous measures.  \href{http://personality-project.org/revelle/syllabi/454/454.wk.5a.pdf}{items vs continuous measures}.  Unfortunately, items have serious problems with \href{http://personality-project.org/revelle/syllabi/454/sem.skew.pdf}{skew}. 

One of the most powerful applications of sem is the analysis of  \href{http://personality-project.org/revelle/syllabi/454/sem.change}{change}. 

\subsection{Week 6}
Comparing three examples from the literature: a   \href{http://personality-project.org/revelle/syllabi/454/erdle.09.pdf}{short example} \citep{erdle:09} of how not to report factor analysis,  \href{http://personality-project.org/revelle/syllabi/454/erdle.10.pdf}{ a sem paper which}  which actually fails to identify the model correctly  \citep{erdle:gfp:10}
and \href{http://personality-project.org/revelle/syllabi/454/marsh.10.a.pdf}{another}  \citep{marsh:scalas:10}  which systematically compares models.  This last one  includes a good discussion of how to do measurement invariance.

\subsection{Weeks 7-9}
\Rpkg{lavaan} uses many examples from the MPlus manual (\url{http://www.statmodel.com/ugexcerpts.shtml}.  See in particular the example data sets at \url{http://www.statmodel.com/usersguide/chapter5.shtml}.   The notes describing \Rpkg{lavaan} output for these examples are \href{http://personality-project.org/revelle/syllabi/454/454.wk9.pdf}{available here}.

Comparing sem in  \href{http://personality-project.org/r/sem.chap4.pdf}{R and LISREL} \citep{joreskog:99}. Consideration of goodness of fit tests (\href{http://www.sciencedirect.com/science/journal/01918869 }{Barratt et al., 2007)} (Click on Issue 5 in the left had column).    \href{http://personality-project.org/revelle/syllabi/454/454.week6.lisrel.pdf}{R and LISREL lecture notes}   
 
 Commercial software for structural equation modeling:  \href{http://www.mvsoft.com/products.htm}{EQS} \cite{bentler:eqs}, LISREL \citep{joreskog:99} \href{http://www.statmodel.com}{MPlus} \citep{Mplus}.
 \subsection{R advice}
    The \href{http://personality-project.org/r}{R tutorial} gives a short introduction to the use of R.  
    \begin{itemize}
\item (Macs and PCs) For this, or any other package to work, you must activate it by either using the Package Manager or the ``library" command: 
\begin{itemize}
\item type library(psych)
\item If loading the psych package  works, function such as "describe" and "pairs.panels" should work (or at least give an error
message that is NOT "could not find function").
\item entering ?psych  will give a list of the functions available in the psych package. 
\end{itemize}
 \end{itemize}
 
\subsection{Using the Social Science Computer Cluster}

\begin{enumerate}
\item Get 
 \href{http://sscc.northwestern.edu/docs/howtos.cfm/}{an account} and then to log in as a remote user.

\item Log on to the system using SSH (see the \href{http://sscc.northwestern.edu/docs/setup_ssh.cfm}{``how to"} for doing this)
\item upload the appropriate batch command file using a \href{http://sscc.northwestern.edu/docs/transfer_files.cfm}{sftp connection}.
 \item Issue a batch command (e.g., lisrel8 infile outfile)
 \item sftp the outfile back to your desktop
 \item repeat (3-5) until satisfied 
 \end{enumerate}
 %\section{References}
\bibliography{../all} 
 

 
        



\end{document}  