Now the skew is basically zero, but the kurtosis and variance are not
precisely Gaussian. For 20,000 observations, the above would give
similar skew, kurtosis=2.987949 and variance = .9991686. (n=2000:
small skew, kurt=2.937, Var=.99386)

I see a number of possible approaches to this issue.

1) Include the numbers 1 and 0 in the uniform distribution. This
doesn't work: the invnorm function simply produces missing values for
those observations.

2) Take a harder look at my allegedly perfect uniform distribution.
Is this where I went wrong?

3) Try another statistics package?? (Somehow I doubt that this would
help.)

4) We can always rescale the dispersion. Divide the resulting
distribution by the standard deviation. Consider this addition to the
10,000,000 obs example:

gen double perfnorm2=perfnorm/r(sd)
sum perfnorm2, detail

In that case, skew stays close to zero, var=1 and kurtosis is
unaffected - still less than 3.

5) Set up a loop and iteratively modify a couple of observations to
improve the kurtosis. Set the proper variance with 4). I
experimented with that: one problem is that this patch doesn't really
produce a perfect theoretic Gaussian distribution, but rather a
kludge.

6) Ignore the problem and characterize it as an oddity. Note though
that this may imply that normally distributed standard random
variables in Stata will not be perfectly standard normals *on
average*: even their variance will be a little lower without
adjustment. These effects would presumably be swamped by ordinary
sampling randomness.

More generally, I wonder whether this is the proper way to generate a
standard normal random variable in Stata:

Might this effect matter in small samples? Sure: for n=20, the
unadjusted variance of the theoretic standard normal would be .794,
which seems low.

But recall point 2): I'm probably missing something. For example, the
uniform random number generator would not produce the sort of evenly
spread-out numbers in my perfuniform variable. So this adjustment may
be inappropriate. Monte Carlo work might clarify matters, as would
additional conceptual insight. In short, I would avoid using this
adjustment without further analysis.

7) Or perhaps I *am* generating perfectly normal distributions, but
that theoretic normals only have kurtosis -> 3 as n -> infinity. I
don't know.