# lineals: Linearizing bivariate regressions In aspect: A General Framework for Multivariate Analysis with Optimal Scaling

## Description

This function performs optimal scaling in order to achieve linearizing transformations for each bivariate regression.

## Usage

 `1` ```lineals(data, level = "nominal", itmax = 100, eps = 1e-06) ```

## Arguments

 `data` Data frame or matrix `level` Vector with scale level of the variables ("nominal" or "ordinal"). If all variables have the same scale level, only one value can be provided `itmax` Maximum number of iterations `eps` Convergence criterion

## Details

This function can be used as a preprocessing tool for categorical and ordinal data for subsequent factor analytical techniques such as structural equation models (SEM) using the resulting correlation matrix based on the transformed data. The estimates of the corresponding structural parameters are consistent if all bivariate regressions can be linearized.

## Value

 `loss` Final value of the loss function `catscores` Resulting category scores (after optimal scaling) `cormat` Correlation matrix based on the scores `cor.rat` Matrix with correlation ratios `indmat` Indicator matrix (dummy coded) `scoremat` Transformed data matrix (i.e with category scores resulting from optimal scaling) `burtmat` Burt matrix `niter` Number of iterations

## Author(s)

Jan de Leeuw, Patrick Mair

## References

Mair, P., & de Leeuw, J. (2008). Scaling variables by optimizing correlational and non-correlational aspects in R. Journal of Statistical Software, Volume 32, Issue 9..

de Leeuw, J. (1988). Multivariate analysis with linearizable regressions. Psychometrika, 53, 437-454.

`corAspect`

## Examples

 ```1 2 3``` ```data(galo) res.lin <- lineals(galo) summary(res.lin) ```

### Example output

```Correlation matrix of the scaled data:
gender  1.00000000 -0.04874627  0.0587721  0.44464385  0.11812726
IQ     -0.04874627  1.00000000 -0.3785085 -0.02835839 -0.04516452
advice  0.05877210 -0.37850852  1.0000000  0.10432693  0.10179781
SES     0.44464385 -0.02835839  0.1043269  1.00000000  0.21574025
School  0.11812726 -0.04516452  0.1017978  0.21574025  1.00000000

Correlation ratios:
gender 1.000000000 0.062646808 0.04382425 0.211611346 0.02876474
IQ     0.002374223 1.000000000 0.14797968 0.002707828 0.02368946
advice 0.003453644 0.151868265 1.00000000 0.014426019 0.03786227
SES    0.197709488 0.015776525 0.02439980 1.000000000 0.06305761
School 0.013954884 0.005686305 0.01462881 0.047306820 1.00000000

Category scores:
gender:
score
F  0.02827736
M -0.02741393

IQ:
score
1  0.01493307
2  0.04974990
3  0.03738258
4 -0.01845816
5 -0.01950283
6  0.03631026
7  0.00945805
8 -0.04985012
9 -0.05793540

score
Agr   0.03773377
Ext  -0.03560291
Gen  -0.02665911
Grls -0.04475325
Man   0.02311238
None -0.02683326
Uni   0.03177932

SES:
score
LoWC   0.035301554
MidWC -0.004592743
Prof   0.023233137
Shop  -0.029013033
Skil   0.034270873
Unsk  -0.058979048

School:
score
1   0.033547729
2  -0.055892479
3  -0.030851601
4   0.022145217
5   0.006617672
6  -0.016776551
7  -0.027050022
8   0.046316419
9   0.006755903
10  0.007598514
11 -0.023818143
12 -0.029238985
13 -0.023741831
14 -0.001763256
15  0.060965074
16  0.004110105
17 -0.004537087
18 -0.010765472
19  0.041463536
20 -0.008007485
21  0.035683000
22  0.014749997
23  0.003369739
24 -0.056624313
25  0.034450939
26 -0.017516501
27  0.040176603
28  0.010139095
29  0.057634029
30 -0.049383121
31  0.017509168
32  0.007637931
33  0.013166794
34 -0.033436307
35  0.021174944
36 -0.013521375
37 -0.008761477
```

aspect documentation built on May 2, 2019, 2:15 p.m.