🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.stat-l
Article #3556

Simulation Data Handling

#3556
From: Charles H. Franklin
Date: Sat, 25 Jan 1992 21:12
57 lines
3313 bytes
Folk:

    I've spent a frustrating day beating on SYSTAT without much
success, so I thought I'd toss this out for your edification.  It illustrates
the effects of collinearity. I end with a plea for advice on SYSTAT.

    I've assigned the following problem to my students:
    Create the following model
       y = 5 + .5*X2 - .35*X3 + u
    where x2 has mean zero and variance 1, x3 has mean zero and variance
1.5, and u has mean zero and variance 2.

    Now replicate this data 50 times, using fixed x2 and x3 but allowing
u to vary across replications. Run the 50 regressions and collect the
estimates of the coefficients and find the mean coefficient and plot the
distribution.

    Just to make it interesting, let the correlation between x2 and x3
vary from 0 to .9, in steps of .1.

    Note that this means you have 50 observations x 50 replications x 10 levels
of correlation between x2 and x3.

    Now collect your 500 coefficient estimates of x2 and x3 and plot the
estimates against the correlation of x2 and x3. Also plot the estimated
standard errors and the t-ratios against corr(x2,x3).

    This gives a nice illustration of the effects of collinearity. The means
of the coefficients remain stable (since the estimates are unbiased) but you
can see the standard errors rise and the t-values fall. Box plots
against the correlations make a real nice display.

    My problem is that SYSTAT is making it very difficult to keep the
same values of X2 and X3 across the 50 replications.  You can append
datasets, but that means running data;append; 500 times. Not very
palatable. I'd like to just generate the 50 observations of X2 and X3, then
reset the seed so I get the same sequence and generate another 50 observations.
Then repeat this until I have the 25000 total cases I need.
So far, I can't find a way to add cases within the data module.
(Without having to APPEND files)
I can do it all in MACRO _except_ that macro won't let you reset the
random seed. It seems that everywhere I turn I run into _one little detail_
that prevents doing what I want.  Anyone out there got a solution to this
which is efficient and not too time consuming (machine time)?

Note that this is actually very easy to do if the x2 and x3 are allowed to
vary across replications. I've done that, and it produces nice results.
It is also easy to do correctly in Gauss (which is what I normally use) but my
students use SYSTAT, so I need a SYSTAT solution.

If anyone has any ideas about a solution, I'd appreciate hearing from
you. If not, the example is still useful for classroom use.

chf
Washington University
and
University of Wisconsin, Madison
Technical Details
Message-ID: <STAT-L%92012516434006@VM1.MCGILL.CA>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!paladin.american.edu!auvm!WUVMD.BITNET!C38871CF

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5efb,3a6f07569341ab02,start
X-Google-Attributes: gidf5efb,public
X-Google-ArrivalTime: 1992-01-25 13:54:41 PST
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!paladin.american.edu!auvm!WUVMD.BITNET!C38871CF
Message-ID: <STAT-L%92012516434006@VM1.MCGILL.CA>
Newsgroups: bit.listserv.stat-l
Date:         Sat, 25 Jan 1992 15:12:36 CST
Sender:       "STATISTICAL CONSULTING" <STAT-L@MCGILL1.BITNET>
From:         "Charles H. Franklin" <C38871CF@WUVMD.BITNET>
Subject:      Simulation Data Handling