[R] lavaan: how to analyse residuals of a latent variable

Hans Ekbrand hans at sociologi.cjb.net
Tue Aug 9 15:25:39 CEST 2011


On Tue, Aug 09, 2011 at 01:49:13PM +0200, yrosseel wrote:
> 
> >My question is: how can I analyse the part of the variation in
> >fire.setting that is not included in the latent variable criminality?
> >Ideally I would want a new variable that captures just this. Then I
> >could model regressions with this variable as the dependent variable.
> 
> You can add a regression line to your model syntax with
> 'fire.setting' as the dependent variable:
> 
> fire.setting ~ x1 + x2 + x3
> 
> were x1-x3 are additional predictors that might influence the
> variable 'fire.setting'.

Can I include criminality among those and thereby get the common part
of criminality and fire.setting "out of the way"?

I tried adding the following regression formula:

fire.setting ~ parental.migration + parental.class + sex.girl + 
	       priviledged.parents + school.adaption + school.grades +
               criminality

but I got:

Error in solve.default(E) :
Lapack routine dgesv: system is exactly singular 
 
[lavaan message:] could not compute standard errors! 
 
 You can still request a summary of the fit to inspect 
 the current estimates of the parameters.

However, the fit-object has regression estimates were criminality
seems to have about the same size as I would have thought, given the
covariation of fire.setting and criminality.

                   Estimate  Std.err  Z-value  P(>|z|)   Std.lv  Std.all

  fire.setting ~
    parental.migr     0.001                               0.001    0.003
    parental.clas    -0.000                              -0.000   -0.000
    sex.girl         -0.015                              -0.015   -0.019
    priviledged.p     0.066                               0.015    0.039
    school.adapti     0.004                               0.002    0.005
    school.grades    -0.012                              -0.010   -0.026
    criminality       0.327                               0.191    0.505

Are the other estimates reasonable estimates of the part of variation
in fire-setting that does not co-variate with criminality?


--
Hans Ekbrand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110809/82718ffa/attachment.bin>


More information about the R-help mailing list