Page 1 of 1

Problem creating vector using group in Eviews 13

Posted: Thu Dec 01, 2022 5:48 am
by johansamuelsson
Hi

We have a problem in generel to convert group into a vector in Eviews 13. For example in Eviews12 we use the following code to convert a group to a vector. This code works in Eviews 12 but not in Eviews 13. See picture

Eviews 13: Nov 29 2022 build

Regards Johan And Jonathan

Code: Select all

WfCreate(page=q) q 2020q4 2020q4 For !i = 1 To 9 Series Tmp{!i} = @Rnd Next Group A Tmp* Vector M1 = @Convert(A)
[img]error.png[/img]

Re: Problem creating vector using group in Eviews 13

Posted: Thu Dec 01, 2022 7:49 am
by SpanbergErik
This works for me:

Vector M1 = @Transpose(@Convert(A))

Re: Problem creating vector using group in Eviews 13

Posted: Thu Dec 01, 2022 10:35 am
by EViews Jason
In versions prior to 13, there wasn't a clear distinction between the vector and rowvector types. In some places you could use a rowvector and in others you could use a vector. To make matters worse, there are instances where you could use both. This made EViews behavior ambiguous.

Case in point, is the usage of @convert. In versions prior EViews 13, while the command

Code: Select all

Vector M1 = (@Convert(A))
would run and not error, if you opened M1 you will quickly notice M1 is actually a rowvector despite being declared as vector and the type listed at the top of the window as 'vector'.

In EViews 13, we have removed a lot of the ambiguous behavior. The rowvector type is now a separate type. Better error reporting and more stringent usage has been implemented when pertaining to rowvectors. Aesthetically speaking, rowvectors now have a unique icon in the workfile window and the type listed at the top of window is now 'rowvector'.

To resolve the reported issue and depending on whether you want M1 to be a vector or rowvector, you can either use SpanbergEriks suggestion of transposing the results returned by @convert or you can declare M1 as a rowvector.

Code: Select all

Vector M1 = @Transpose(@Convert(A))
or

Code: Select all

rowvector M1 = @Convert(A)

Re: Problem creating vector using group in Eviews 13

Posted: Thu Dec 01, 2022 12:41 pm
by johansamuelsson
Thanks!

Re: Problem creating vector using group in Eviews 13

Posted: Thu Sep 12, 2024 11:48 am
by Phil09
I convert a group to a matrix then to a vector using the following:
vector MyVector = @vec(@convert(MyGroup))