Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Mata Variance Calculation


From   Thomas Jacobs <[email protected]>
To   [email protected]
Subject   Re: st: Mata Variance Calculation
Date   Fri, 14 May 2010 17:03:34 -0500

Tirthankar,

Thanks very much!

Tom

On Fri, May 14, 2010 at 4:39 PM, Tirthankar Chakravarty
<[email protected]> wrote:
> 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.
> ***************************
> clear*
> mata
> mA = runiform(100, 1)
> quadvariance(mA)
> sum((mA :-mean(mA)):^2)/rows(mA)
> sum((mA :-mean(mA)):^2)/(rows(mA)-1)
> end
> ***************************
>
> T
>
> 2010/5/15 Thomas Jacobs <[email protected]>:
>> 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:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>
>
>
> --
> 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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Thomas Jacobs

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index