From 31a9472546d75488a20693547e7eca05cd4a8a60 Mon Sep 17 00:00:00 2001
From: sboker
Date: Fri, 21 Jun 2013 15:36:39 +0000
Subject: [PATCH] Add state space help page
git-svn-id: http://openmx.psyc.virginia.edu/svn/trunk@2605 df83fd30-4cca-4c36-ab9d-e8b5583ccbd1
---
man/OpenMx.Rd | 4 +-
man/mxExpectationStateSpace.Rd | 96 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+), 2 deletions(-)
create mode 100644 man/mxExpectationStateSpace.Rd
diff --git a/man/OpenMx.Rd b/man/OpenMx.Rd
index e9b588c..a13cc00 100644
--- a/man/OpenMx.Rd
+++ b/man/OpenMx.Rd
@@ -22,9 +22,9 @@
}
\details{
-OpenMx solves algebra optimization and statistical estimation problems using matrix algebra. The OpenMx library defines a set of S4 classes and functions used to create them. The majority of these classes are used as arguments in models, which may include data, matrices, algebras, bounds and constraints. These models are then paired with either built-in objective functions (maximum likelihood and FIML) or user-defined functions. These models can then be optimized, resulting in parameter estimation, algebra evaluation, and output for additional models.
+OpenMx solves algebra optimization and statistical estimation problems using matrix algebra. The OpenMx library defines a set of S4 classes and functions used to create them. The majority of these classes are used as arguments in models, which may include data, matrices, algebras, bounds and constraints. Models most often have an expectation function (e.g., mxExpectationNormal) to calculate the expectations for the model. Each model has one and only one fit function which may either be built-in (e.g., \link{mxFitFunctionML} or \link{mxFitFunctionWLS} ) or user-defined fit functions (e.g., \link{mxFitFunctionR} or \link{mxFitFunctionAlgebra}). The resulting model can then be optimized using \link{mxRun}, resulting in parameter estimates, algebra evaluation, and output for additional models.
-The main OpenMx functions are: \link{mxAlgebra}, \link{mxBounds}, \link{mxCI}, \link{mxConstraint}, \link{mxData}, \link{mxMatrix}, \link{mxModel}, and \link{mxPath} as well as \link{mxAlgebraObjective}, \link{mxFIMLObjective}, \link{mxMLObjective} and \link{mxRAMObjective}. These latter functions create the objectives for model estimation. Models are run (estimated) using \link{mxRun}.
+The main OpenMx functions are: \link{mxAlgebra}, \link{mxBounds}, \link{mxCI}, \link{mxConstraint}, \link{mxData}, \link{mxMatrix}, \link{mxModel}, and \link{mxPath}; the expectation functions such as \link{mxExpectationNormal}, \link{mxExpectationRAM}, \link{mxExpectationLISREL}, and \link{mxExpectationStateSpace}; and the fit functions such as \link{mxFitFunctionML}, \link{mxFitFunctionWLS}, \link{mxFitFunctionAlgebra}, \link{mxFitFunctionRow} and \link{mxFitFunctionR}. These latter functions create the objectives for model estimation. Models are run (estimated) using \link{mxRun}.
These functions create the following Objects: \link{MxModel}s, which can contain \link{MxPath}s, \link{MxMatrix} objects, and \link{MxData} as well as \link{MxAlgebra}, \link{MxBounds}, \link{MxCI}s (confidence intervals) and \link{MxConstraint}s.
diff --git a/man/mxExpectationStateSpace.Rd b/man/mxExpectationStateSpace.Rd
new file mode 100644
index 0000000..1a7fa75
--- /dev/null
+++ b/man/mxExpectationStateSpace.Rd
@@ -0,0 +1,96 @@
+%
+% Copyright 2007-2013 The OpenMx Project
+%
+% Licensed under the Apache License, Version 2.0 (the "License");
+% you may not use this file except in compliance with the License.
+% You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+% See the License for the specific language governing permissions and
+% limitations under the License.
+
+\name{mxExpectationStateSpace}
+\alias{mxExpectationStateSpace}
+
+\title{Create an MxExpectationStateSpace Object}
+
+\description{
+This function creates an MxExpectationStateSpace object.
+}
+
+\usage{
+mxExpectationStateSpace(A="A", B="B", C="C", D="D", Q="Q", R="R", x0="x0", P0="P0",
+ dimnames = NA, thresholds = NA, threshnames = dimnames)
+}
+
+
+\arguments{
+ \item{A}{A character string indicating the name of the 'A' matrix.}
+ \item{B}{A character string indicating the name of the 'B' matrix.}
+ \item{C}{A character string indicating the name of the 'C' matrix.}
+ \item{D}{A character string indicating the name of the 'D' matrix.}
+ \item{Q}{A character string indicating the name of the 'Q' matrix.}
+ \item{R}{A character string indicating the name of the 'R' matrix.}
+ \item{x0}{A character string indicating the name of the 'x0' matrix.}
+ \item{P0}{A character string indicating the name of the 'P0' matrix.}
+ \item{dimnames}{An optional character vector to be assigned to the column names of the 'F' and 'M' matrices.}
+ \item{thresholds}{An optional character string indicating the name of the thresholds matrix.}
+ \item{threshnames}{An optional character vector to be assigned to the column names of the thresholds matrix.}
+}
+
+\details{
+Expectation functions define the way that model expectations are calculated. The mxExpectationStateSpace provides maximum likelihood estimates of free parameters in a model of the covariance of a given \link{MxData} object. This model is defined by reticular action modeling (McArdle and McDonald, 1984). The 'A', 'B', 'C', 'D', 'Q', 'R', 'x0', and 'P0' arguments must refer to \link{MxMatrix} objects with the associated properties of the A, B, C, D, Q, R, x0, and P0 matrices in the RAM modeling approach.
+
+The 'dimnames' arguments takes an optional character vector. If this argument is not a single NA, then this vector be assigned to be the column names of the '?' matrix and optionally to the '?' matrix, if the '?' matrix exists.
+
+THE NEXT PART IS INCOMPLETE. MIKE HUNTER NEEDS TO FINISH THIS PART.
+
+The 'A' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'B' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'C' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'D' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'Q' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'R' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'x0' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+The 'P0' argument refers to the A matrix in the State Space approach. This matrix consists of .
+
+
+The \link{MxMatrix} objects included as arguments may be of any type, but should have the properties described above. The mxExpectationStateSpace will not return an error for incorrect specification, but incorrect specification will likely lead to estimation problems or errors in the \link{mxRun} function.
+
+mxExpectationStateSpace evaluates with respect to an \link{MxData} object. The \link{MxData} object need not be referenced in the mxExpectationStateSpace function, but must be included in the \link{MxModel} object. mxExpectationStateSpace requires that the 'type' argument in the associated \link{MxData} object be equal to 'cov' or 'cor'.
+
+To evaluate, place mxExpectationStateSpace objects, the \link{mxData} object for which the expected covariance approximates, referenced \link{MxAlgebra} and \link{MxMatrix} objects, and optional \link{MxBounds} and \link{MxConstraint} objects in an \link{MxModel} object. This model may then be evaluated using the \link{mxRun} function. The results of the optimization can be found in the 'output' slot of the resulting model, and may be obtained using the \link{mxEval} function..
+}
+
+\value{
+ Returns a new MxExpectationStateSpace object. mxExpectationStateSpace objects should be included with models with referenced \link{MxAlgebra}, \link{MxData} and \link{MxMatrix} objects.
+}
+
+\references{
+McArdle, J. J. and MacDonald, R. P. (1984). Some algebraic properties of the Reticular Action Model for moment structures. \emph{British Journal of Mathematical and Statistical Psychology, 37,} 234-251.
+
+The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.
+}
+
+\examples{
+
+# Create and fit a model using mxMatrix, mxAlgebra, mxExpectationNormal, and mxFitFunctionML
+
+library(OpenMx)
+
+# Simulate some data
+
+# The example is that there is no example.
+
+}
--
2.1.4