🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

autocorrelated vars with given std

#3600
From: Evan Cooch
Date: Thu, 02 Jan 1992 21:42
38 lines
2310 bytes
Sorry, couldn't think of a better subject header.

What I would like to do is create a stream of "random" numbers that
have (a) a specified fist-order autocorrelation in the errors, and
(b) a given standard deviation for the final distribution.

I can create autocorrelated errors easily enough...

lagerr=normal(0);
do i=1 to 100;
 error=lagerr*CORR+normal(0);
 output;
 lagerr=error;
end;

This gives me a hundred "random" numbers for which the correlation
between X(t) and X(t-1) is CORR (whatever CORR is set to).
However, it isn't obivous to me how to set the standard deviation
of this autocorrelated distribution. Everything I've tried so
far has failed miserably. Any help (code, explanations of
the obvious) would be greatly appreciated. I need to prove to
a reviewer that the results of some simulations I've been running don't
vary depending upon whether the the random input is autocorrelated
or not. I argue in my paper that it is the magnitude of the variance
(SD), and not the dgree of autocorrelation that matters. Thuis, my need
to control the standard deviation, but fool with the autocorrelation.

Many thanks in advance...

           _///_
           -. .-
           ( L )    \////     +----------------------------+
         --(\=/)--  (   )     |       Evan G. Cooch        |
        /         \ /  /      |   Department of Biology    |
        I          V  /       | University of Pennsylvania |
        I            /        | Philadelphia, Pennsylvania |
        I           /         |       (215-898-7129)       |
                              +----------------------------+
Technical Details
Message-ID: <STAT-L%92010216504854@VM1.MCGILL.CA>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!paladin.american.edu!auvm!PENNSAS.UPENN.EDU!ECOOCH

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5efb,f18d0b7e126eeef8,start
X-Google-Attributes: gidf5efb,public
X-Google-ArrivalTime: 1992-01-02 13:59:35 PST
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!paladin.american.edu!auvm!PENNSAS.UPENN.EDU!ECOOCH
Message-ID: <STAT-L%92010216504854@VM1.MCGILL.CA>
Newsgroups: bit.listserv.stat-l
Date:         Thu, 2 Jan 1992 16:42:22 EST
Sender:       "STATISTICAL CONSULTING" <STAT-L@MCGILL1.BITNET>
From:         Evan Cooch <ECOOCH@PENNSAS.UPENN.EDU>
Subject:      autocorrelated vars with given std
X-To:         SAS-L@OHSTVMA.BITNET, STAT-L@MCGILL1.BITNET