Sven,

Thanks for message.

Noted what you say about the emails. With this email, I'm using the reply facility in Google Mail, and have altered the heading subject - hope this is better.

​Thanks for the suggestions re random sampling - will give it a try.

Best,

George​



On 14 December 2016 at 18:00, <gretl-users-request@lists.wfu.edu> wrote:
Send Gretl-users mailing list submissions to
        gretl-users@lists.wfu.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
        gretl-users-request@lists.wfu.edu

You can reach the person managing the list at
        gretl-users-owner@lists.wfu.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-users digest..."


Today's Topics:

   1. Re: Random selection from two data series and blending
      (Sven Schreiber)
   2. Re: Adding data values on the fly (George Matysiak)


----------------------------------------------------------------------

Message: 1
Date: Tue, 13 Dec 2016 18:16:53 +0100
From: Sven Schreiber <svetosch@gmx.net>
To: gretl-users@lists.wfu.edu
Subject: Re: [Gretl-users] Random selection from two data series and
        blending
Message-ID: <55a014df-93df-8e23-2044-59039eca96ba@gmx.net>
Content-Type: text/plain; charset=windows-1252; format=flowed

Am 13.12.2016 um 17:30 schrieb George Matysiak:
> I have a related question. I have undated data in two series x and y,
> with 50 observations in each. There is no overlap in their respective
> observation numbers i.e. x runs from 1-50 and y from 51-100. I would
> like to draw a random sample from each, say 20, and combine the two
> random samples into a series consisting of the 40 observations. I've
> played around with this but can't quite seem to get there. Any
> suggestions would be very welcome. Thanks.

George, first it would be helpful if you could quote a few lines of the
original post to which you're referring when you write things like
"related". (Also, your posts somehow break the mailing thread structure,
they aren't recognized as replies to something earlier. Which makes it
even harder to understand to what you're referring. That's probably the
fault of your mail program; which one are you using?)

Anyway, you could use the resample() function combined with a bunch of
sample (smpl) restrictions to get the desired sample lengths. This is
also in the menus I think under the "Sample" main menu (draw with
replacement).

Perhaps more advanced and for scripting use could be the use of
mrandgen(i,< ...>) to produce random integers to be used as index
numbers for drawing from the series.

hth,
sven


------------------------------

Message: 2
Date: Tue, 13 Dec 2016 19:02:27 +0100
From: George Matysiak <gmatysiak@gmail.com>
To: gretl-users@lists.wfu.edu
Subject: Re: [Gretl-users] Adding data values on the fly
Message-ID:
        <CAEWMk7s=ciQ4gRFVuaYkFYEv+so+H89_Jmxt0JEosd_mu4D0bA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Sven,

This is my script:

# Projecting levels value of x1 for 3 periods ahead, 2016-2018

Dataset addobs 3

scalar x1_GROWTH= 5 # Annual Percentage Growth

genr x1["2016"]= (1+x1_GROWTH/100)*x1["2015"]

genr x1[2017"]= (1+x1_GROWTH/100)*x1["2016"]

genr x1["2018"]= (1+x1_GROWTH/100)*x1["2017"]

fcast 2016 2018 variable_name

The last x1 value is for 2015 and these generated x1 values are then put
into an existing series x1.

These are your x1 values. I could simply change the scalar value to obtain
a different scenario, say x2 values. I wasn't sure how to save  the
different scenario values, x2, as they would overwrite the previous values
in the x1 scenario values. Hope that makes sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wfu.edu/pipermail/gretl-users/attachments/20161213/8633c06e/attachment-0001.html>

------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

End of Gretl-users Digest, Vol 119, Issue 15
********************************************