Search found 184 matches

by javiersan
Tue Nov 16, 2010 5:41 am
Forum: Programming
Topic: How to know if alpha is empty
Replies: 1
Views: 2296

How to know if alpha is empty

Hello,

I want to know if an alpha object is empty. I can do the following:

Code: Select all

series ll=@len(myalpha)
!maxl=@max(ll)


where myalpha is the alpha series and !maxl will be zero if the alpha is empty.

Is there a command to replicate this?

Thanks,

Javier
by javiersan
Wed Nov 10, 2010 4:57 am
Forum: Econometric Discussions
Topic: x12 question
Replies: 0
Views: 1900

x12 question

Hello, I am trying to reconstruct the US SAAR housing starts series from the US Census Bureau using State-level data which is nsa and not annualised. The seasonal adjustment used is based on the X12 algorithm but I am unsure about the parameters used. I have tried several specifications and used x12...
by javiersan
Fri Nov 05, 2010 8:42 am
Forum: Programming
Topic: Finding common last observation in workfile
Replies: 6
Views: 5934

Re: Finding common last observation in workfile

It does work with the following variation:

Code: Select all

smpl if @robs(g)=g.@count
series t = @trend+1
string date = @otod(@max(t))


Thanks,

Javier
by javiersan
Fri Nov 05, 2010 3:18 am
Forum: Programming
Topic: Finding common last observation in workfile
Replies: 6
Views: 5934

Re: Finding common last observation in workfile

Actually, the code only works if the series have no gaps, so for most cases it may have to be modified.

Javier
by javiersan
Fri Nov 05, 2010 2:57 am
Forum: Programming
Topic: Finding common last observation in workfile
Replies: 6
Views: 5934

Finding common last observation in workfile

Hello, I wonder if there is a way of finding the last date that has a non-na observation for all the series in a workfile (or group). At the moment this can be achieved by the following convoluted commands: group g * series tracklast=@recode(@rnas(g)=0,na,@rnas(g)) !lastv=@ifirst(tracklast)-1 %last_...
by javiersan
Sat Oct 23, 2010 2:19 pm
Forum: Programming
Topic: Open file with forced alphas
Replies: 7
Views: 6544

Re: Open file with forced alphas

Actually, the second method does not work well when the annotation has two characters (like "127 be" in say 2010q2). When doing

Code: Select all

wfopen namq_gdp_k.tsv colhead=1 custom="b" delim=white mult=on


the 127 will be stored in 2010q3.

The othermethod works fine.

Thanks,

Javier
by javiersan
Fri Oct 22, 2010 2:04 pm
Forum: Programming
Topic: Open file with forced alphas
Replies: 7
Views: 6544

Re: Open file with forced alphas

I knew it had to be possible! That's brilliant, thanks very much Gareth.
by javiersan
Fri Oct 22, 2010 9:52 am
Forum: Programming
Topic: Open file with forced alphas
Replies: 7
Views: 6544

Re: Open file with forced alphas

Unfortunately it doesn't seem to work like that for me. Take for example the .tsv file zipped in here http://epp.eurostat.ec.europa.eu/NavTree_prod/everybody/BulkDownloadListing?sort=1&file=data%2Fnamq_gdp_k.tsv.gz it is 10mb when unzipped so too large for attachment. It is better if you can ope...
by javiersan
Thu Oct 21, 2010 5:15 pm
Forum: Programming
Topic: Open file with forced alphas
Replies: 7
Views: 6544

Re: Open file with forced alphas

Thanks Gareth, I'll try that.
by javiersan
Thu Oct 21, 2010 3:34 pm
Forum: Programming
Topic: Open file with forced alphas
Replies: 7
Views: 6544

Open file with forced alphas

Hello, I have several tsv (tab-separated) files with data that has notes, for example a tab separated field can have a value of "125 a" and another field is "127". When I wfopen the file sometimes the series with notes are read as alphas and sometimes as series with the annotated...
by javiersan
Wed Oct 20, 2010 7:45 am
Forum: Programming
Topic: List of elements in a workfile
Replies: 1
Views: 2428

List of elements in a workfile

Hello,

Is there any string function that gives a list of all the elements of a workfile (the names of tables, graphs, series, etc.)?

Thanks

Javier
by javiersan
Wed Oct 20, 2010 7:00 am
Forum: Programming
Topic: Transpose of a group view programmatically
Replies: 8
Views: 6807

Re: Transpose of a group view programmatically

Thanks! That's not in the manuals, isn't it?

Javier
by javiersan
Wed Oct 20, 2010 5:39 am
Forum: Programming
Topic: Transpose of a group view programmatically
Replies: 8
Views: 6807

Transpose of a group view programmatically

Hello,

I have a set of alpha series in a group. When I open it I the group view options allow for it to be transposed but I cannot find what the program equivalent syntax is. Could you please let me know if this is possible?

Many thanks,

Javier
by javiersan
Fri Oct 15, 2010 4:18 am
Forum: Programming
Topic: Calling subroutines
Replies: 2
Views: 2768

Re: Calling subroutines

Thanks, I see where my problem was.

This works
%proc="myprocedure_proc1"
call {%proc}

but this doesn't seem to work
%proc="proc1"
call myprocedure_{%proc}

Regards,

Javier
by javiersan
Fri Oct 15, 2010 1:19 am
Forum: Programming
Topic: Calling subroutines
Replies: 2
Views: 2768

Calling subroutines

Hello,

Is there a way of making something like the code below work?

Code: Select all

for %proc proc1 proc2 proc3 proc4
call myprocedure_{%proc}
next

subroutine myprocedure_proc1
...
endsub

subroutine myprocedure_proc2
...
endsub

etc.


Many thanks,

Javier

Go to advanced search