If you have no full dataset, but you do have a sample covariance matrix, you
can still fit your model. If you wish to add a mean structure, you need to
provide a mean vector too. Importantly, if only sample statistics are provided,
you must specify the number of observations that were used to compute the
sample moments. The following example illustrates the use of a sample
covariance matrix as input. First, we read in the lower half of the
covariance matrix (including the diagonal):

The getCov() function makes it easy to create a full covariance matrix
(including variable names) if you only have the lower-half elements (perhaps
pasted from a textbook or a paper). Note that the lower-half elements are
written between two single quotes. Therefore, you have some additional
flexibility. You can add comments, and blank lines. If the numbers are
separated by a comma, or a semi-colon, that is fine too. For more information
about getCov(), see the online manual page.

Next, we can specify our model, estimate it, and request a summary
of the results:

If you have multiple groups, the sample.cov argument must be a list
containing the sample variance-covariance matrix of each group as a separate
element in the list. If a mean structure is needed, the sample.mean argument
must be a list containing the sample means of each group. Finally, the
sample.nobs argument can be either a list or an integer vector containing the
number of observations for each group.