[Limdep Nlogit List] standard deviation

wgreene at stern.nyu.edu wgreene at stern.nyu.edu
Wed Sep 2 23:02:47 EST 2009


Mr. Levy. You are not doing anything wrong. The s.d. is being reported zero to 14 decimal places. The difference is internal  rounding error because the s.d. is actually being computed, not automatically reported as 0. Digital computers cannot represent 0.9 exactly. 
B. Greene

Bill Greene/646-596-3296/wgreene at stern.nyu.edu

-----Original Message-----
From: Cyrus Levy <levy.cyrus at gmail.com>

Date: Wed, 2 Sep 2009 07:29:21 
To: <limdep at limdep.itls.usyd.edu.au>
Subject: [Limdep Nlogit List] standard deviation


What am I doing wrong with the following code? Could you please help me?

reset;
create; var=-0.9 $
dstat; rhs = var $
sample; 1-10 $
dstat; rhs = var $

With this code, I create a variable (var) which is equal to -0.9 everywhere.
Then I check the descriptive statistics of the variable but the standard
deviation is not equal to 0 and it's positive. Then I set the sample to the
first 10 observations and look at the descriptive statistics again, and the
standard deviation changes but it's still not equal to 0. Could you please
tell me what's wrong with my code? Is it due to calculation precision? Can I
change it?


--> reset;
Initializing NLOGIT Version 4.0.1 (January 1, 2007).
--> create; var=-0.9 $
--> dstat; rhs = var $
Descriptive Statistics
All results based on nonmissing observations.
===============================================================================
Variable     Mean       Std.Dev.     Minimum      Maximum        Cases
Missing
===============================================================================
------------------------------------------------------------------------------
All observations in current sample
------------------------------------------------------------------------------
VAR     | -.900000      .639559E-13 -.900000     -.900000         4524
0
--> sample; 1-10 $
--> dstat; rhs = var $
Descriptive Statistics
All results based on nonmissing observations.
===============================================================================
Variable     Mean       Std.Dev.     Minimum      Maximum        Cases
Missing
===============================================================================
------------------------------------------------------------------------------
All observations in current sample
------------------------------------------------------------------------------
VAR     | -.900000      .117028E-15 -.900000     -.900000           10
0
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au


More information about the Limdep mailing list