# getparam.mix: Present Parameters of General Location Model in an... In mix: Estimation/Multiple Imputation for Mixed Categorical and Continuous Data

## Description

Present parameters of general location model in an understandable format.

## Usage

 `1` ```getparam.mix(s, theta, corr=FALSE) ```

## Arguments

 `s` summary list of an incomplete normal data matrix created by the function `prelim.mix`. `theta` list of parameters such as one produced by the function `em.mix`, `da.mix`, `ecm.mix`, or `dabipf.mix`. `corr` if `FALSE`, returns a list containing an array of cell probabilities, a matrix of cell means, and a variance-covariance matrix. If `TRUE`, returns a list containing an array of cell probabilities, a matrix of cell means, a vector of standard deviations, and a correlation matrix.

## Value

if `corr=FALSE`, a list containing the components `pi`, `mu` and `sigma`; if `corr=TRUE`, a list containing the components `pi`, `mu`, `sdv`, and `r`.

The components are:

 `pi` array of cell probabilities whose dimensions correspond to the columns of the categorical part of \$x\$. The dimension is `c(max(x[,1]),max(x[,2]),...,max(x[,p]))` where p is the number of categorical variables. `mu` Matrix of cell means. The dimension is `c(q,D)` where q is the number of continuous variables in x, and D is `length(pi)`. The order of the rows, corresponding to the elements of `pi`, is the same order we would get by vectorizing `pi`, as in `as.vector(pi)`; it is the usual lexicographic order used by S and Fortran, with the subscript corresponding to `x[,1]` varying the fastest, and the subscript corresponding to `x[,p]` varying the slowest. `sigma` matrix of variances and covariances corresponding to the continuous variables in `x`. `sdv` vector of standard deviations corresponding to the continuous variables in `x`. `r` matrix of correlations corresponding to the continuous variables in `x`.

## Note

In a restricted general location model, the matrix of means is required to satisfy `t(mu)=A%*%beta` for a given design matrix `A`. To obtain `beta`, perform a multivariate regression of `t(mu)` on `A` — for example, `beta <- lsfit(A, t(mu), intercept=FALSE)\$coef`.

## References

Schafer, J. L. (1996) Analysis of Incomplete Multivariate Data. Chapman \& Hall, Chapter 9.

`prelim.mix`, `em.mix`, `ecm.mix`, `da.mix`, `dabipf.mix`.

## Examples

 ```1 2 3 4``` ```data(stlouis) s <- prelim.mix(stlouis,3) # do preliminary manipulations thetahat <- em.mix(s) # compute ML estimate getparam.mix(s, thetahat, corr=TRUE)\$r # look at estimated correlations ```

### Example output

```Steps of EM:
1...2...3...4...5...6...7...8...9...10...11...12...13...14...15...16...17...18...19...20...21...22...23...24...25...26...27...28...29...30...31...32...33...34...35...36...37...38...39...40...41...42...43...44...45...46...47...48...49...50...51...52...53...54...55...56...57...58...59...60...61...62...63...64...65...66...67...68...69...70...71...72...73...74...75...76...77...78...79...80...81...82...83...84...85...86...87...88...89...90...91...92...93...94...95...96...97...98...99...100...101...102...103...104...105...106...107...108...109...110...111...112...113...114...115...116...117...118...119...120...121...122...123...124...125...126...127...128...129...130...131...132...133...134...135...136...137...138...139...140...141...142...143...144...145...146...147...148...149...150...151...152...153...154...155...156...157...158...159...160...161...162...163...164...165...166...167...168...169...170...171...172...173...174...175...176...177...178...179...180...181...
R1        V1        R2        V2
R1 1.0000000 0.8024177 0.6985010 0.8217321
V1 0.8024177 1.0000000 0.6803922 0.8186402
R2 0.6985010 0.6803922 1.0000000 0.7818385
V2 0.8217321 0.8186402 0.7818385 1.0000000
```

mix documentation built on June 20, 2017, 9:13 a.m.