# Version History (Technical)

## Version 0.5-13 06/06/16

- Fix the validate function again to fix the problem that some models cannot be run.
- Add package names in the do.call command.
- Fix the setPopulation function.
- Fix the problem that the skewness argument does not work on bindDist.

## Version 0.5-12 02/29/16

- Fix the validate function by adding drop=FALSE.

## Version 0.5-11 06/29/15

- Update many functions to be compatible with lavaan 0.5-18 or higher because lavaan changed the way to handle equality constraints in parameter tables. The changed functions include drawParam, generate, model, model.lavaan, sim, summaryParam, and validateCovariance.
- Delete the library functions from the codes according to CRAN policy.

## Version 0.5-9 12/03/14

- Add stdCoef, stdSE, and stdPopParam slots in the result object. Change all functions according to the addition of these slots, such as clean or combineSim functions.
- Change the summaryParam, summaryPopulation, and summaryConverge function to provide the summary of standardized results
- Change all functions relating to OpenMx to be compatible with OpenMx 2.0.
- Change the error messages in the sim function to acknowledge the function format for generate and model arguments.
- Fix the model.lavaan function that provides error message when KA or GA matrices exist
- Remove copula example and hope that the package is compilable in Maverick OS.

## Version 0.5-8 10/03/14

- The saveLatentVar feature provide residual factor scores, measurement error scores, and total factor scores.
- Remove all hidden functions from the lavaan package and use its public functions
- The generate argument in the sim function can take a function that generates data
- Bug fixes for data generation using lavaan

## Version 0.5-5 03/02/14

- Add saveLatentVar argument to generate, createData, and sim functions
- Add outfundata argument to the sim function
- Add stopOnError argument to the sim function
- Fix the plotCutoff and getCutoff functions in order to handle uppercase variable names
- Provide progress report when parallel processing is not used
- Add simsem.multicore option in order to adjust the default option of parallel processing by users
- Bug fixes in the generate function that the fiml is not used when data has missing observations

## Version 0.5-3 03/17/13

- Add empirical argument to generate and createData functions
- Add cilower and ciupper slots in the SimResult class. Change the combineSim and clean functions according to the adjustment
- Add cilevel and citype arguments in the sim function to pass through the parameterEstimates function in lavaan
- Change plotCutoff and getCutoff methods into functions and change other functions using these functions accordingly
- Add getCIwidth and plotCIwidth function
- Add continuousConverage, getCoverage, findCovarege, and plotCoverage functions
- Change the sim function to specify lavaan script in the model argument only (do not need to specify the generate function)
- Add summaryTime, summarySeed, coef, and inspect functions to investigate results
- Add the improper and nonconverged argument on the getPopulation and getExtraOutput functions
- The timing slot of SimResult has starting time and end time
- Edit some example wrong codes and typos in the documentation

## Version 0.5-2 03/09/13

- Modify the lavaanGenerate function to be similar to the simulate function in the lavaan package
- Fix the bug in multiple groups when labels are specified in one group but not the other group

## Version 0.5-1 02/17/13

- Change the package to not depend on the copula package. The copula slot from the SimDataDist object takes ANY types of object. The NullCopula class does not contain copula
- The model argument of the sim function can take a function which can takes an arbitrary function for data analysis.
- The summary and summaryShort methods can be run if the fit indices are not provided.

## Version 0.5-0 02/10/13

- Fix small bugs in the createData function that mistakenly uses '@' instead of '$'
- Add GA and KA for the exogenous covariate effect in the model, model.lavaan, and estmodel function. The SimSem object will have GA and KA in the dgen object.
- Fix small bugs in naming auxiliy instead of aux
- The draw, drawParam, createData, generate, and sim functions have the covData argument to account for the effect of exogenous covariates. The draw-family function will use GA and KA to find residual variances and model-implied sufficient statistics. The createData function will use exogenous variables to create data given that the exogenous covariates are known.
- The find-family function can take care of the effect of covariates.
- Change all arguments to be case-insensitive, such as usedFit in the methods for result object or modelType in model function
- Change the structure to remember that CFI and TLI needed to be reversed. Instead of listing them in each function, the getKeywords function is used to save those fit indices. Other incremental fit indices are also added such as NFI, GFI, and so on.
- Change the structure of the sim function to depend on functions from the lavaan package as many as possible. For example, the reducedParamSet, reduceLavaanParam function is removed and the parameterEstimates function from lavaan is used instead.
- Data-generation parameters are vectorized in all replications right after the data are generated (by the parsePopulation function). The parameters do not need to be parsed after the analysis result from each replication is obtained.
- The labelParam slot is removed from result object. The getParameterLabels from the lavaan package is used instead.
- Add more stringent error-checking routines.
- Modify the sim function such that the rawData argument can take population data. The population data will be drawn into different datasets and analyzed by the target model. The population data itself are also analyzed to get the parameter values.
- The generate and model arguments in the sim function can take lavaan script, parameter table, or a list of arguments. The generate argument will be passed to the lavaanSimulateData function which is a modified simulateData function from lavaan (described below). The model argument will be passed to analyzeLavaan function (described below). The lavaanfun argument is also added to specify which functions users would like to use to analyze data (the default is the lavaan function).
- The lavaanSimulateData function is modified from the simulateData function to 1) fix bugs that the function cannot take parameter table, 2) use createData function in the simsem package to generate data, and 3) appropriately put the right variance for latent indicator variables when categorical variables are specified.
- The analyzeLavaan function is simply a hub to analyze data by the lavaan (including cfa, sem, or growth), runMI, or auxiliary functions.
- The bindDist function has two more arguments: skewness and kurtosis. These arguments will be passed to the createData function and then lavaanValeMaurelli83 function, which is modified from lavaan to generate data based on Vale and Maurelli (1983) method. The lavaanValeMaurelli83 function is a bug-fix version for a single variable.
- The SimDataDist class has two more slots: skewness and kurtosis. The plotDist function is adjusted for the new change.
- The summary and summaryShort methods are modified based on the changed definition of classes.
- The summaryParam function has the matchParam argument to report the common labels between the coef slot and paramValue slot.
- Add combineSim function to combine two result objects into a single result object
- Add generateOpenMx, analyzeOpenMx, and other functions in the simsem and semTools package to create data and run OpenMx in the simsem package
- Add previousSim and completeRep arguments in the sim function to run the simulation until the number of convergent replications is equal to the specified number of replications.
- A single-group data set will not have the group variable anymore.
- The analyze function can take simsem model template or OpenMx object
- The generate function can take simsem model template, OpenMx object, or lavaan script
- The anova function is rewritten to be more efficient
- Fix the bug in the validatePath function that the floating numbers are treated as unequal when they are actually equal.
- Add the HeadrickSawilowsky1999 function to create nonnormal data based on Headrick and Sawilowsky (1999) method. However, this function has not been publicized yet.
- Change the pValue methods to function in order to not depend on calling MxModel object. The pValueDataFrame and pValueVector are added for those pValue methods for data frame and vector.
- Fix the summary method to not show correlation of fit indices when only one replication is convergent and not calculate correlation for constant fit index value across replications
- Report the scaled fit indices as a default if they are available in a result object.

## Version 0.4-999 1/6/13

- Change all S4 objects to reference classes. All codes work well. However, the time used is not lower than the S4 objects. Therefore, the S4 classes are retained. The reference class package is available in the
*referenceclass*branch.

## Version 0.4-6 12/30/12

- Edit the documentation of the
**model**and**sim**functions - Add the
**mvrnorm**function to create data row-wise such that the first*p*rows are the same when data with*p*and*p + n*rows are generated with the same random number seed. - The
*copula*argument is added to the**bindDist**function in order to save the multivariate copula template, which will implement the Mair and colleagues' method for data gneeration. The**SimDataDist**class and**createData**function are modified to implement the method. - The
**summary**method for the**SimDataDist**class and the**plotDist**function support the Mair and colleagues' method.

## Version 0.4-5 12/18/12

- Change the error messages in
**model**and**sim**to be more useful. - Go over the
**sim**and**runRep**functions to make them more efficient

## Version 0.4-4 11/28/12

- Fix the bug in
**changeScaleSEM**that did not extract the group appropriately when nonlinear constraints exist (group in a parameter table is listed as 0) - Fix the mess in the while loop of
**drawParam**.

## Version 0.4-3 11/19/12

- A bug is in
**extractExtraParam**that cannot extract a label because the list of parameters in a single group is unlisted - Fix the wrong nonlinear constraint parameter values in
**extractExtraParam**because of not using parentheses.

## Version 0.4-2 10/29/12

- Fix the multiple imputation problem that cannot be run because of the group label problem

## Version 0.4-1 10/24/12

- Fix the group name default in the
**anal**function to the name specified in the model template. - Do not try to extract standard errors when the lavaan object is not convergent in the
**runRep**function, which will be crashed in the lavaan 0.5-10 or later. **getPowerFit**,**getPowerFitNested**, and**getPowerFitNonNested**are changed from methods to functions because the request from CRAN that does not allow the method that cutoff is missing.

## Version 0.4-0 10/24/12

- Fix the
*optMisfit*and*misfitBound*in the**draw**function to work. Thus, these arguments in the**createData**and**sim**will work as well. - Write the
**equalCon**and**applyConScript**functions to fix the equality/inequality constraints in data generation. Thus, the problem that equality constraint cannot be applied across groups or matrices is fixed. - Add the
*con*argument in the**model**function to take phantom variables/equality constraint/inequality constraint. The simsem object has the*con*attribute that saves the phantom variables/constraints definition. - Make the result object to contain additional parameters. The
**summaryParam**function can compare the parameter estimates on additional parameters. - The result object contains the labels of each parameter. Then, the
**summaryParam**also provides the labels of each parameter. - The order of data generation is implemented. The order of 1) imposing equality constraints, 2) imposing trivial misspecification, and 3) filling unspecified parameters can be specified by the
*createOrder*argument in the**draw**,**generate**and**sim**functions. The**misspecOrder**is built to implement the order of data generation.

## Version 0.3-14 10/22/12

- Fix the
**analyze**and**anal**functions to ignore grouping variable when there is only one group - SERIOUS BUG: Fix the bug in translation in the beta matrix such that the independent variable was set as dependent variable as vice versa in the
**buildPT**function. - Fix the labels problems in the model function.

## Version 0.3-13 10/17/12

- Add the p() specification in an intercept to set the average missing proportion of target variable.
- Add the
**plotLogitMiss**function to visualize the logistic MAR script.

## Version 0.3-12 10/15/12

- Add the logistic method for imposing the missing data at random via
**logitMiss**function. - Add the
*logit*slot to the missing object and*logit*argument to the**miss**and**imposeMissing**functions. - Use the
**impose**function in the**sim**function instead of**imposeMissing**function. - Fix the problem that beta matrix is read as symmetric when creating parameter table by
**buildPT**function - Fix the incorrect labels in parameter table when the path analysis model is used.
- Allow to specify
*missing*argument in the**analyze**function.

## Version 0.3-11 09/26/12

- Fix the problem in running
**sim**when the sample size is varying (only one replication provided) - Add the code in
**fillParam**to make sure that the diagonal elements of*RTE*and*RPS*are not read. - Fix the
**summaryFit**function to provide the output that is executable by**round** - Make the power of traditional chi-square test to be provided only when the sample size, pmMCAR, and pmMCAR are not varying.

## Version 0.3-10 09/25/12

- Make the
**getPowerFit**and**getPowerFitNested**to provide the power based on traditional chi-square test. Also if the null object and cutoff are not provided, the alternative object will be used as the null object. This is useful when researchers wish to find a type I error. - Swap the convergent code a little bit, such that 0 = convergent, 1 = nonconvergent, 2 = nonconvergent in MI, 3 = improper SE, 4 = improper variance, and 5 = improper correlation
- Add the
*improper*argument to**summaryFit**,**summaryParam**,**summaryMisspec**,**summaryPopulation**, and**getExtraOutput**to summarize the output with the improper solutions. - Add the
*improper*argument to**summaryConverge**to separate the nonconvergent summary to improper-solution summary. - Add the
*improper*argument to**clean**to handle improper solutions appropriately. - Fix the bug in
**plannedMissing**such that the*ignoreCols*argument does not work with*twoMethod*

## Version 0.3-9 09/24/12

- Add
**exportData**function to export datasets generated from the model template into data files that are ready to be analyzed by LISREL or Mplus. - Change the
*converged*argument in the result object into number codes and use 0 as convergent. - Change the wrong description in
**summaryShort**function of result object in describing*pmMAR*and*pmMCAR*. - Make the fit index summary in the
**summary**and**summaryShort**functions not show the scientific numbers.

## Version 0.3-8 09/24/12

- Change the default of the
*smart*argument in the**startingVal**as FALSE. The problem of high nonconvergent rates should be solved.

## Version 0.3-7 09/19/12

- Delete the
*smartStart*argument from the**model**family of functions - Add the
*smartStart*argument from in the**sim**function, as well as adding the**imposeSmartStart**function to impose parameter values to the parameter table and the**collapseParamSet**function to vectorize parameter matrices. - Add the
**changeScaleSEM**function to reparameterize the population values. In SEM type of model, the parameter values of residual variance are less than 1 whereas the analysis model fix the residual variance as 1. The parameter values are reparameterized to make the residual variance equals 1. Then add the**changeScaleSEM**function inside the**generate**function in order to generate data from the reparameterized parameters. The**changeScaleSEM**function works for fixed-factor method, manifest-variable method, and constraints in loadings across factor. - Fix the bug in the
**rawDraw**function that the model constraints does not work when the constraints are specified but the model misspecification is not specified. - Delete the
**extract**function and use the*drop=FALSE*in the**"["**function instead - Fix the bug in the
**bind**function when fixed values are specified with*popParam*.

## Version 0.3-6 09/13/12

- Fix the bug in the
**sim**function when the number of factors are not equal across groups. - Allow sample sizes to be unequal across groups by fixing the
**generate**and**sim**functions. - The
*dataOnly*and*paramOnly*attribute in the**sim**function are fixed.

## Version 0.3-5 09/06/12

We have too many changes so that we cannot list them all. In short, more than 50% of the codes in 0.2 family are rewritten including almost all of the core functions. Here are a short list of changes.## Version 0.2-9 09/12/12

- Update the code that reflects the change in the*copula*package.

## Version 0.2-8 07/06/12

- Fix bugs in the**validatePath**function - Delete the

**indProd**and

**residualCovariate**functions from the package (move to the semTools package)

## Version 0.2-7 06/17/12

- Fix bugs in the**cov2corMod**,

**writeLavaanCode**,

**runLavaan**, and

**likRatioFit**- Add three new examples on nested model comparison

## Version 0.2-6 06/17/12

- Make the**anova**method comparing

**SimModelOut**to report difference in AIC and BIC. - Add the

**pValueNested**to provide the

*p*-value for nested model comparison using Monte Carlo approach - Add the

**runFitParam**method to create

**SimResultParam**directly from the data analysis - Add the

**summaryMisspec**function to report the misspecification containing in the parameter result object - Fix the

**summary**and

**summaryFit**method for a bug in printing fit indices cutoffs - Make the

**simResultParam**function to be less time-consuming - Fix the bug in

**getCondQtile**function when multiple values of

*xval*is passed - Fix a bug in

**cov2corMod**when sometimes it reads the target matrix as a vector - Make

**getPowerFitNested**function to be much quicker - Add

**getCutoffNonNested**,

**plotCutoffNonNested**,

**getPowerFitNonNested**, and

**plotPowerFitNonNested**for non-nested model comparison. The varying parameter feature are not implemented in these functions yet. - Add

**pValueNonNested**and

**likRatioFit**for non-nested model comparison based on two analysis results - Fix the bug involving

**all.equal**functions that does not provide a FALSE value

## Version 0.2-5 06/13/12

- Make the**getPowerFit**and

**plotPowerFit**function to be much quicker - The

*xval*argument in the getCondQtile can be specified as

*"all"*in order to find the conditional quantiles of all independent variables values. - Fix the bug in the

**summaryFit**function - Fix the bug in the

**runRep**and

**simResult**when a list of

**data.frame**is passed in the

*objData*argument. - Provide an error message when a result object has no converged replication. - Add two examples about power in rejecting misspecified models

## Version 0.2-4 06/11/12

- Add the**pMiss**slot in the

**SimModelOut**class to save the percent missing of each variable - Change the

**clean**function to extract multiple result objects by simultaneously convergent replications. - Change the output style of the

**anova**method and adding the result when a varying parameter exists. - Improve the

**getPowerFit**and

**plotPowerFit**functions to account for a varying parameter. - Add the

**getCutoffNested**and

**plotCutoffNested**functions to find the cutoffs in nested model comparison - Add the

**getPowerFitNested**and

**plotPowerFitNested**functions to find the power in rejecting nested model when the nested model is not true.

## Version 0.2-3 06/06/12

- Fix the**runRep**method to assign the random seed to the appropriate environment - Fix the

**writeLavaanConstraint**function to account for mean constraints - Rewrite the

**summary**method for the

**SimResult**class by calling

**summaryFit**function - Add the

**summaryFit**function to directly provide the information about fit indices

## Version 0.2-2 06/05/12

- Change the**simMissing**function and

**SimMissing**class to save the additional arguments to be passed to

*Amelia*package. - Change the

**runMI**function to take additional arguments to be passed to

*Amelia*package - Change the

**simResult**function to create L'Ecuyer method of random number seed and pass to

**runRep**function. Then, the

**runRep**function will change the seed based on the L'Ecuyer random number. - (To be released) The functions in

**bind.R**and

**parTable.R**files will be used for the new design of

*simsem*

## Version 0.2-1 05/28/12

- Change the names of**getPower**and

**plotPower**functions to

**getPowerFit**and

**plotPowerFit**- Add the

*pred*argument for the

**continuousPower**function to take the independent variables' values - Add the

**getCondQtile**function to find the conditional quantile value - Improve the

**getCutoff**function to find conditional fit indices - Change the

**summary**method for the

**SimResult**class when the sample size or percent missing is varied: providing conditional fit indices' cutoffs. - Fix the bug in the

**plotCutoff**function - Add the

**findPower**and

**findTargetPower**functions to give the value of varying parameters that provides the desired power. - Add the

**getPower**function as the automated function for the

**continuousPower**function - Add the

**plotPower**function to plot the power of parameters against varying parameters - Fix the bug in

**standardize**function - Change the

*keepScale*argument in the

**SimDataDist**class to take a vector of logical values instead of a single logical value - Change the

**run-SimDataDist**and

**extract-SimDataDist**methods to handle multiple logical values in the

*keepScale*attribute - Add and fix all documentation - Add Example 17, 18, and 19 to illustrate the varying parameter simulation in the vignette

## Version 0.2-0 05/18/12

- The version is the first uploaded into CRAN. - All examples in the documentations are edited to reduce the amount of time running through all examples. For example, the numbers of replications in most examples are 5. - Add*Example 16*in the vignette and proofread all examples in the vignette

## Version 0.1-6 05/15/12

- Change the second argument of the**SimMatrix**,

**SimVector**, and

**SymMatrix**classes from

*param*to

*value*. - Change the second argument of the constructor of those classes to

*value*, as well as the

**adjust**function. - Change the way to save the distribution objects in those classes as a text containing an expression that can be evaluated directly, instead of an object name. By this way, the random distribution object can be built and run in hpc. - Add

**checkInputValue**,

**checkInputValueVector**, and

**toFunction**functions to change a distribution object name to an expression - Add

*suppressWarnings*to all codes involving with the

*cor2cov*function.

## Version 0.1-5 05/14/12

- Add the*optMisfit*and

*numIter*attributes in the

**SimMisspec**class to account for the optimization method for selecting the set of misspecified parameters - Change

**simMisspecCFA**,

**simMisspecPath**, and

**simMisspecSEM**to account for the new attributes - Change the

**runMisspec**function to account for the optimization method to find a set of misspecification - Add

**isRandom**function to check whether an object has a random parameter - Optimize the

**simResult**function to draw parameter only once if there is no random parameter - Fix the bug on the

**validatePath**function - Add

*optMax*,

*optMin*, and

*optNone*keywords in the

**getKeywords**functions to list the words for minimization, maximization, and none in the

*optMisfit*argument.

## Version 0.1-4 05/10/12

- Add**toSimSet**and

**simData**methods using

**SimRSet**class, as well as change the documentation - Fix a minor bug in

**popMisfit**- Fix the error in documentation of

**popMisfitMACS**and

**popDiscrepancy**

## Version 0.1-3 05/06/12

- Use**cor2cov**in the

*lavaan*package - Fix the bugs in

**findFactorTotalVar**,

**findFactorToalCov**, and

**findFactorResidualVar**functions when using the

**cor2cov**from

*lavaan*- Add the

**show**method to prevent flooding of all objects in the screen when users typing an object name - Add

*usedFitPop*in the

**getKeywords**to set the default of the used population misfit - Fix the

**constrainMatrices**function to getting rid of inaccurate object when the target object is equally constrained (such as delete RTE when TE is constrained). - Fix the

**run(SimSet)**method to use the

*misBeforeFill*argument - Fix the

**runMisspec**function to make six different orders of

*misBeforeFill*,

*conBeforeMis*, and

*conBeforeFill*- Change the

*conBeforeMis*and

*misFitBound*arguments from the

**SimData**class (as well as the

**simData**and

**runFit**functions) to

**SimMisspec**class (as well as

**simMisspecCFA**,

**simMisspecPath**, and

**simMisspecSEM**functions) - Add

*misfitType*and

*misBeforeFill*arguments in the

**SimMisspec**class (as well as

**simMisspecCFA**,

**simMisspecPath**, and

**simMisspecSEM**functions) - Add

*conBeforeFill*argument in the

**SimEqualCon**class - Add

**vectorizeObject**method for the

**MatrixSet**class - Add two new classes:

**SimGenLabels**and

**SimResultParam**- Add the

**makeLabels**method for the

**SimSet**class and provide the

**SimGenLabels**that saves the labels in the data generation parameterization - Add

**countMACS**,

**plotMisfit**, and

**simResultParam**functions - Fix the bug in

**countFreeParameters**, as well as adding the method for

**SimEqualCon**and

**SimREqualCon**- Separate the

**drawParameters**function into

**drawParameters**and

**drawParametersMisspec**functions - Add

**popMisfit**methods as well as

**popMisfitMACS**and

**popDiscrepancy**function - Fix the

**summary**method for

**SimModel**to provide the accurate value of free parameters. - Change the documentation accordingly - Use

*formatR*for all codes -

**To do: Connect SimResultParam to SimResult**

## Version 0.1-2 05/03/12

- Write documentations of almost all functions - Change the name of**fitMeasures**function to

**fitMeasuresChi**- Get rid of the header of the R folders - Use formatR to make code look pretty

## Version 0.1-1 04/20/12

- Add*modelBoot*and

*realData*attribute in the

**SimData**class. Change the

**runFit**and

**simData**to take these arguments accordingly. - Change the

**createData**function to implement the Bollen-Stine bootstrap approach for data generation. - Change the documentation for this change accordingly - Fix the

**simResult**function bug when using the

*objSet*argument

## Version 0.1-0 04/19/12

- Change order of the**simData**function from

*(n, param, ...)*to

*(param, n, ...)*and change the

**simData**function to

**simData**methods - Allow

**SimModelOu**t (instead of

**SimSet**) as the output of the

**simData**methods - Allow

**SimModelOut**(instead of

**SimSet**) as the output of the

**simModel**methods - Add

**toSimSet**function to change

**SimModelOut**to

**SimSet**- Add

*indicatorLab*as the attribute of

**SimData**,

**SimDataOut**,

**SimModelOut**- Change how to create

**SimParam**class in the

**createFreeParameters**function - Add logical argument in the

**imposeMissing**function to impose missing by the matrix of logicals - Add

**SimFunction**and

**NullSimFunction**Classes for transforming data during the simulation - Add

**summary**,

**isNullObject**and

**run**methods for the

**SimFunction**class - Change

**simResult**and

**runRep**functions to account for

**SimFunction**class - Add

**simFit**methods to run a Monte Carlo simulation based on the result of data analysis - Add

**continuousPower**function to calculate the power of each parameter with respect to sample size and percent missing - Add

**indProd**function to make the products of indicators in order to make latent interaction construct - Add

**residualCovariate**function to residualize variables to control the covariate - Fix

**WriteLavaanCode**bug that cannot analyze the data with covariate - Change

*indicatorLab*argument name to

*indLab*- Write and fix all documentations for the this version - Add

*covAsAux*in the

**simMissing**function and class to choose whether using the covariate as auxiliary variables - Change the name of

**SimFreeParam**class to

**SimParam**- Add

*prAttr*argument in the

**imposeMissing**function for percent attrition - Change the way to specify the default fit indices by putting into

**getKeywords**function instead of listing it all the time - Change

**pValu**e function to methods and add the routine to compare between the

**SimModelOut**class and the

**SimResult**class - Change the

**runRep**and

**simResult**function to save the data generation model and pass it to the result object - Add

**extract**methods for data frame to extract selected indicators or factors - Add

**cov2corMod**function and Change

**cov2cor**to

**cov2corMod**in the code to handle zero variances - Add

**summaryPopulation**,

**getPopulation**, and

**setPopulation**methods as well as their documentations. - Fix a bug in the

**reduceMatrices**function - Rename 8 files that use to find indicators/factors means/totalVar/ResidualVar/Intercept. Change attribute names to make more sense. Make all eight functions public and write the documentation accordingly. -

**IMPORTANT BUG**: fix a problem in

**findIndResidualVar**and

**findIndTotalVar**that use PS instead of model-implied factor covariance in the package. Fix the

**fillParam**function accordingly. Fix the bug in

**expandMatrices**as well. - Fix a minor bug in

**fillParam**that do not calculate VPS in CFA model. - Add

**findFactorTotalCov**to find model-implied covariance from regression coefficient matrix and residual covariance matrix. - Make

**findPossibleFactorCor**and

**findRecursiveSet**public and make the documentation accordingly. - Delete

**combineVectorExoEndo**,

**contain**,

**cor2cov**,

**equalWhich**,

**extractDiag**,

**extractLine**,

**isNAVector**,

**writeLavaanConstraint**- Rename

**countRandomObject**to

**countFreeParameters**- Rename

**extractLavaanSummary**to

**extractLavaanFit**- Rename

**transform.constraint**to

**writeLavaanConstraint**- Rename

**findOpenMxValues**to

**setOpenMxObject**- Rename

**findFitIndicesOpenMx**to

**extractOpenMxFit**- Rename

**transformConstraint**to

**writeLavaanConstraint**- Rename

**typeConstraint**to

**writeLavaanIndividualConstraint**- Add and update code description of all files; Change some function code to make them more elegant

## Version 0.0-11 04/05/12

- Add clean function to remove nonconverged replications from the simResult before computing the output. - Use clean function for getCutoff, getPower, plotCutoff, plotPower, summary, and summaryParam functions/methods before analyzing SimResult object - Add plotQtile function to plot a quantile of Y given a value of X - Add plot3DQtile function to plot a quantile of Z given a value of X and Y (can be either contour plot or perspective plot) - Add n, pmMCAR, pmMAR, objSet arguments for simResult for varying n, pmMCAR, pmMAR in the simResult and an option to specify simSet instead of specifying simData and simModel - Change name simData, simModel, simMissing to objData, objModel, objMissing in simResult and runRep function - For run-SimMissing, add pmMCAR and pmMAR arguments to post hocly overwrite the percent missing - Add n, pmMCAR, and pmMAR as attributes of the SimResult class - Specify data.frame with 0 row or 0 column as null object in data.frame class - Add correlation between n/pmMCAR/pmMAR and parameter estimate and standard error in summaryParam-SimResult method - Add correlation between fit indices and n/pmMCAR/pmMAR in summary-SimResult method - Change the documentation of SimResult and plotCutoff for the changes. - Change all function names containing dots into camelCase. - Change to be compatible with R 2.15 - Add simParamCFA, simParamPath, simParamSEM functions to create parameters for data analysis (no starting values for creating data).## Version 0.0-10 03/31/12

- Make SimDataOut, SimModelOut, and SimResult have sample size argument (n). - Change run, createData, simResult functions to save sample size in the returning class. - Add miPoolChi to pool chi-square statistics - Change miPool to pool chi-square statistics by the previous functions and add compute fit indices - Add fitMeasures function to compute fit indices - Explain the pooling procedure in miPool.Rd## Version 0.0-9.1 03/31/12

- Fixing the bug that free the exogenous factor correlation when we actually fixed it.## Version 0.0-9 03/11/12

- Adding anova method for nested and nonnested comparison and its help page. - Changing code in run(SimSet), run(SimMisspec), run.misspecified to be more efficient by adding fillParam function - Change the get.keywords function to provide only necessary code (do not provide different inputs for different in lower or upper cases) - Make match.keyword code to be case-insensitive - Adding PS, TE, TD, PH, TH for covariance matrix in SimSet and MatrixSet classes. The reassign.names, constrain.matrices, all SimSet and SimMisspec constructors, reduce.matrices, expand.matrices, create.free.parameters are changed accordingly. - The help page of SimSet-class, SimMisspec-class, and all of their constructors. - Debug miPool.R that has a problem when a matrix or a vector contains only one element. - Debug imposeMissing.R that has a problem when there is no covariate.## Version 0.0-8 03/05/12

- Change the write.lavaan.code function to handling auxiliary variables - Make the writeLavaanNullCode function to write a null model - Add the indicatorLab, factorLab, and auxiliary arguments in simModel function and SimModel class - Make the run-SimModel method to be able to select some variables to analyze - Fix a bug in the imposeMissing, summary-SimSet, miPool, and createData function - Make runMI be able to select some variables as auxiliary variables - Add extract method to select a part of the SimMatrix, SimVector, and SimSet. - Fix the help page for simModel and add the help page for the extract method - Change SimSet and SimMisspec correlation arguments to have leading R (PH -> RPH, PS -> RPS, TD -> RTD, TE -> RTE) - Allow setting the overall variance as 0 to mean no residual or measurement errors. - Changing how to handle MAR to threshold method - Adding two examples on auxiliary variable/MAR and single-indicator factor - Make the miPoolVector function public and make the manual page.## Version 0.0-7.1 02/27/12

- Fix a bug in validate.covariance, runRep, run-SimDataDist## Version 0.0-7 02/26/12

- Add the indicatorLab, errorLab, and factorLab arguments in the run-SimModel method to analyze real data - Fix a bug in the runRep function - For a complete data, listwise is used as default, instead of fiml. - Add the SimDataDist class for modeling data distribution in factors, errors, or indicators (including its null class) - Adding sequential method to create data starting from factors and adding up until getting the values of indicators. - Adding extract method for extract elements of SimDataDist or matrix - Adding many new distributions: imBeta, SimBinom, SimCauchy, SimChisq, SimExp, SimF, SimGamma, SimGeom, SimHyper, SimLnorm, SimLogis, SimNbinom, SimPois, SimT, SimWeibull. Including classes, constructors, summary, summaryShort, and run methods - Adding plotDist function for plot distribution or plot SimDataDist - Adding make.labels method for distribution objects - Change the name of create.implied.MACS to createImpliedMACS and make it public - Adding Examples 8 and 9 in the introduction manual for accounting for nonnormal distributed data. - Adding the estimator option in the SimModel object - Change runLavaan to put default values for all outputs first. - Add functiions to find skewness and excessive kurtosis from data and distribution object## Version 0.0-6 02/21/12

- Add standardized coefficient in the SimModelOut summary and in the SimResult attribute. - Fix the bug that data does not contain model misspecification when users actually specify - simResult will not parallelize in generating parameters but parallelize in generating data. - use clusterApplyLB for parallization in Windows but mclapply for other OS platforms - Fix minor bugs in the overlap.hist function and write.lavaan.code function - Change how to write code in the run-SimData method - Add welcome message when loading the program! - Fix for passing any non-positive definite data # Error: Unserialize example 3 with X-side## Version 0.0-5.0 02/09/12

- Handle warnings from the summaryParam function - Handle warnings and errors from the examples of imposeMissing function - Change the way to run simResult function to facilitate Rmpi in the future (using the runRep function) - Change miPool to pool the SimModelOut class - Change the order of the simResult function from (simData, simModel, simMissing, nRep) to (nRep, simData, simModel, simMissing). The examples and manual are changed accordingly. - Add the SimModelMIOut (with NullSimModelOut) class which is the child class of the SimModelOut class - Change the is.null.object and summaryParam functions for the SimModelMIOut class - Add two new examples on the introduction about missing data - Comment out the runOpenMx function because we will not implement OpenMx now - Fix bugs in reduce.matrices - Add SimMissing class with the run and the summary functions - Adjust the convergence checking in the runLavaan function according to the lavaan chagnes - Add the simResult function parallelizable## Version 0.0-4.0 11/17/11

- Add imposeMissing.R to package for imposing missing data. - Add runMI.R to package for running multiple imputation on missing data sets and managing the result pooling - Add miPool.R: pools MI results## Version 0.0-3.0 11/17/11

- Patrick builds simsem and haphazardly increases the version number without documenting the additional functionality.## Version 0.0-2.1 11/16/11

- Add SimDataOut class. The constructor of this class is run(simData, dataOnly=FALSE). - run-simModel.c can take objects from SimDataOut class and analyze bias in parameter estimates and whether confidence intervals cover the underlying parameter values. - All summary methods are improved to be more readable and more informative. - summary-SimDataOut.c is added - summaryParam-SimModelOut.c is added. - summaryParam-SimResult.c is modified to provide average parameter values, standard deviation of parameter values, average bias, standard deviation of bias, percentage coverage, relative bias, relative bias of SE, and standardized bias. Last three is provided if setting detail=TRUE. - summaryParam documentation file is modified accordingly. - SimModelOut.c and SimResult.c are changed to have paramValue attributes. - subtractObject.f is written to subtract two sets of parameter values. - Update the vignette by explaining the output from summary.f - Bug fixes in create.free.parameters.f, simSetCFA.f, simSetPath.f, simSetSEM.f that did not free error variances and measurement intercepts when using default. - Change the name of constant.vector.f --> constantVector.f - Add freeVector.f to create vector of free parameters with starting values.*Existing Problem: In SEM model, total endogenous factor variances are fixed as 1 in data model but, instead, residual factor variances are fixed as 1 in the estimation. Therefore, high bias in factor loading and measurement error variances in endogenous side. Change in parameter values are needed. (Fixed by the standardize method 03/05/12)*simsem, Version 0.0-2.0 11/15/11 - Change all public function names and public function arguments to camelCase (private functions still have bad naming) - Change the names and attributes of all public and private classes. - Change file names according to the name changes. All names changes details are in the simsemNameChangeToV0.0-2.xls - All documentation are changed according to the name changes. - Use \itemize and \enumerate appropriate to the context in documentation files - simResult.f can take list of data frame - Make silent argument in simResult.f to be better (some error messages still appear) - Update the vignette according to the name changes and comments from Maurico - Add the function recap section in each example in the vignette.

## Version 0.0-1.8 10/12/11

* Add**simAnalysis**class into the package * debug

**constrain.matrices(list, simConstraint)**when constrained

**LX**matrix * Add

**vectorize**functions * Add

**combine.object(freeParamSet, list)**where

**list**is the lavaan object * Change

**simResult**class to save parameter estimates and standard errors * Change

**find.cutoff**,

**find.power**,

**plot.cutoff**, and

**plot.power**according to the change in the

**simResult**class * Add the

**summary.parameters**function for the

**SimResult**class * Add the documentation of the

**simAnalysis**class and the

**summary.parameters**function * Update the vignette on the

**summary.parameters**function

## Version 0.0-1.7 10/11/11

* Write all documents of public functions and public classes, including all links within the help files. * Write comments on some functions about the purposes, arguments, and return values. * Write comments on all classes about the purposes, constructor, and its arguments. * Delete**visualize**method and write

**plot.cutoff**instead. * Add

**find.power**and

**plot.power**methods. * Add summary of simModel and simResult * Update the vignette, including the example of power analysis, add sections on help files and give us feedback. Update object diagram.