Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Mata Variance Calculation

From   Tirthankar Chakravarty <>
Subject   Re: st: Mata Variance Calculation
Date   Sat, 15 May 2010 03:09:13 +0530

Yes. While the documentation does not tell you the exact formula, it
does tell you that the mean involved is calculated, which ends up
costing one degree of freedom in the variance calculation.
mA = runiform(100, 1)
sum((mA :-mean(mA)):^2)/rows(mA)
sum((mA :-mean(mA)):^2)/(rows(mA)-1)


2010/5/15 Thomas Jacobs <>:
> Hi,
> Can anyone confirm whether the variance function in mata is a sample
> value (with n-1 observations) as opposed to a population (with n
> observations) measure?
> IOTW, I have a column vector of 100 values and apply the variance
> function.  Is n=99?  From my own calculations it appears to be so but
> I wish to be sure and it is not stated in the documentation.  Thanks.
> Tom
> --
> Thomas Jacobs
> *
> *   For searches and help try:
> *
> *
> *

To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index