Page 1 of 1

Error with the command table_re en eviews

Posted: Mon Dec 21, 2015 2:33 pm
by a.luna1941
Hi, my name is Alfonso,I'm doing my final thesis work. I'm doing a simulation error of measurement of variables to solve the problem of endogeneity, simulation is the Monte Carlo, I am creating the program and have a problem with the command table_re to run the program. I skip a error(said to be a non- legal or undeterminated).


Thank, Can somebody help me?

The program is this.
---------------------------------------------------

genr x= nrnd

table_re

_re(2,1)="var=0.1"
_re(3,1)="var=0.25"
_re(4,1)="var=0.5"
_re(5,1)="var=1"
_re(6,1)="var=2"
_re(7,1)="var=5"

_re(1,2)="Sesgo"

smpl 1 50
For !casos= 1 to 6

vector(100) beta0_{!casos}
vector(100) beta1_{!casos}

scalar V =varianzas(!casos)

For !i=1 to 100
genr u=nrnd
genr y=3+2*x+u

genr e=u+nrnd
genr x1=x+e*V^0.5

equation eq1.ls y c x1
beta0_{!casos}(!i)=c(1)
beta1_{!casos}(!i)=c(2)

next
_re(!casos+1,2)=@mean(beta1_{!casos})-2

next

Re: Error with the command table_re en eviews

Posted: Mon Dec 21, 2015 2:39 pm
by EViews Gareth
Other than the fact you don't have a space between "table" and "_re", I don't see anything particularly wrong with that code.

Re: Error with the command table_re en eviews

Posted: Tue Dec 22, 2015 3:10 am
by a.luna1941
Thank man, solve that problem, but I jump another error. This time it is with the variance scale. Says variances not defined in :equation: scale V = variance (1).

How do I solve it?

Re: Error with the command table_re en eviews

Posted: Tue Dec 22, 2015 9:46 am
by EViews Gareth
You have a space.

Re: Error with the command table_re en eviews

Posted: Tue Dec 22, 2015 10:27 am
by a.luna1941
Continuing the problem. I corrected space. Error message(VARIANZAS is not defined in "SCALAR V=VARIANZAS(1)")

Re: Error with the command table_re en eviews

Posted: Tue Dec 22, 2015 10:36 am
by EViews Gareth
Do you have an object called VARIANZAS?

Re: Error with the command table_re en eviews

Posted: Tue Dec 22, 2015 11:51 am
by a.luna1941
Solve the problem man. The right to put, scalar v =(!Casos) and no variances.

genr x= nrnd table _re

_re(2,1)="var= 0.1"
_re(3,1)="var= 0.25"
_re(4,1)="var= 0.5"
_re(5,1)="var= 1"
_re(6,1)="var= 2"
_re(7,1)="var= 5"

_re(1,2)="Sesgo"

smpl 1 50
For !casos= 1 to 6

vector(100) beta0_{!casos}
vector(100) beta1_{!casos}

scalar v = (!casos)


For !i=1 to 100
genr u=nrnd
genr y=3+2*x+u

genr e=u+nrnd
genr x1=x+e*v^0.5

equation eq1.ls y c x1
beta0_{!casos}(!i)=c(1)
beta1_{!casos}(!i)=c(2)

next
_re(!casos+1,2)=@mean(beta1_{!casos})-2

next

Thank man.