[R] dimnames and solve
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Mon Jan 20 20:14:02 CET 2003
A feature. What you really are doing is solve(V, diag(3)), and you get
the colnames of the RHS. See the help page!
On Mon, 20 Jan 2003, Giovanni Marchetti wrote:
> If I have a covariance matrix V
> for example
> > V = var(trees)
> > V
> Girth Height Volume
> Girth 9.847914 10.38333 49.88812
> Height 10.383333 40.60000 62.66000
> Volume 49.888118 62.66000 270.20280
>
> I woul like that the inverse (i.e. the concentration matrix)
> had the same dimnames. But I get instead
> > solve(V)
> [,1] [,2] [,3]
> Girth 1.71516635 0.07801175 -0.33476574
> Height 0.07801175 0.04190776 -0.02412188
> Volume -0.33476574 -0.02412188 0.07110330
>
> I would like to know if this is a feature or a mistake.
>
> Thank you to all.
>
> -- Giovanni
> < Giovanni M. Marchetti >
> Dipartimento di Statistica, Univ. di Firenze Phone: +39 055 4237 204
> viale Morgagni, 59 Fax: +39 055 4223 560
> I 50134 Firenze, Italy email: gmm at ds.unifi.it
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list