How to assign the size of a sample to a variable/scalar?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

mamo
Posts: 192
Joined: Wed Nov 07, 2012 9:11 am

How to assign the size of a sample to a variable/scalar?

Postby mamo » Wed May 03, 2017 6:01 am

Dear Eviews team
what is the most direct approach to assign the size of a specific sample to a variable or scalar within a program?
(In the code below provided as an example, the line starting with !samplesize does not work and produces an error)
Best,
mamo

Code: Select all

wfcreate a 2001 2016 4
' The following line gives rise to an error message
!samplesize=@obs(1, "2002 2004 if crossid=3")
' Interestingly, the following line would work
'  show @obs(1, "2002 2004 if crossid=3")

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13317
Joined: Tue Sep 16, 2008 5:38 pm

Re: How to assign the size of a sample to a variable/scalar?

Postby EViews Gareth » Wed May 03, 2017 8:44 am

=@obssmpl
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 31 guests