linefit & equation in the spool object
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
linefit & equation in the spool object
hi,
i would like to show linefit in the five graph, and store every equation and graph in the spool objects, for example the eq_y_f the fist and g_y_f the second (every eqaution with the graph corresponding) and so on
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
{%spool}.display
next
next
i would like to show linefit in the five graph, and store every equation and graph in the spool objects, for example the eq_y_f the fist and g_y_f the second (every eqaution with the graph corresponding) and so on
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
{%spool}.display
next
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
:D
1-but the linefit doesnt appear in the graph
there is a mistake
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
spool myspool
myspool.append eq_{%iname}_{%jname} g_{%iname}_{%jname}.scat{%linefit}
next
next
2- suppose that i would like the show all eqaution followed by all graph in the spool( five equation followed by 5 graph), can you guide me.
1-but the linefit doesnt appear in the graph
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
spool myspool
myspool.append eq_{%iname}_{%jname} g_{%iname}_{%jname}.scat{%linefit}
next
next
2- suppose that i would like the show all eqaution followed by all graph in the spool( five equation followed by 5 graph), can you guide me.
Re: linefit & equation in the spool object
i have solved my second case but how can make regression line in all graph. could you help me please.
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
spool sp
sp.insert(offset=first) eq_{%iname}_{%jname}
sp.insert g_{%iname}_{%jname}
delete g_{%iname}_{%jname}
next
next
sp.move(offset=first) untitled01
sp.move(loc=untitled02) untitled09
sp.move(loc=untitled05) untitled03
sp.move(loc=untitled09) untitled07
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname}
spool sp
sp.insert(offset=first) eq_{%iname}_{%jname}
sp.insert g_{%iname}_{%jname}
delete g_{%iname}_{%jname}
next
next
sp.move(offset=first) untitled01
sp.move(loc=untitled02) untitled09
sp.move(loc=untitled05) untitled03
sp.move(loc=untitled09) untitled07
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
You'll have to explain it a bit better.
Re: linefit & equation in the spool object
i would like to make linefit with y x, y z, y q, y h, y f (y is dependent variable), the problem when i right this code the linefit doesn't appear in the all graph just the scatter.
Code: Select all
graph g_{%iname}_{%jname}.scat{%linefit} {%iname} {%jname} -
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
What do you mean all the graph?
Re: linefit & equation in the spool object
g_y_f , g_y_x, ....
- Attachments
-
- linefit.png (104.44 KiB) Viewed 11041 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
I don't understand what your code is doing at all.
But the way I would do it is to make a group containing the series you want to graph, then freeze the scat view of the group so that you can include a linefit.
But the way I would do it is to make a group containing the series you want to graph, then freeze the scat view of the group so that you can include a linefit.
Re: linefit & equation in the spool object
no, when i make all in the group i get all varialbles in one graph and all linefit in one graph
Code: Select all
group g1 y x z f h q
g1.scat linefit-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
Don't put all the variables in the group.
Code: Select all
group temp {%iname} {%jname}
freeze(g_{%iname}_{%jname}) temp.scat linefit
d temp
Re: linefit & equation in the spool object
i get error message G_Y_X already exists in "GRAPH G_Y_X.SCAT Y X". the workfile attached
Code: Select all
group g1 y x z f h q
for !i=1 to 1
%iname=g1.@seriesname(!i)
for !j=!i+1 to g1.@count
%jname=g1.@seriesname(!j)
'generate 5 equation
equation eq_{%iname}_{%jname}.ls {%iname} {%jname}
' create 5 graph with line and save it in the wf
graph g_{%iname}_{%jname}.scat {%iname} {%jname}
group temp {%iname} {%jname}
freeze(g_{%iname}_{%jname}) temp.scat linefit
d temp
spool sp
sp.insert(offset=first) eq_{%iname}_{%jname}
sp.insert g_{%iname}_{%jname}
delete g_{%iname}_{%jname}
next
next
sp.move(offset=first) untitled01
sp.move(loc=untitled02) untitled09
sp.move(loc=untitled05) untitled03
sp.move(loc=untitled09) untitled07- Attachments
-
- austot_data_10day.WF1
- (17.41 KiB) Downloaded 353 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: linefit & equation in the spool object
Delete this line:
Code: Select all
graph g_{%iname}_{%jname}.scat {%iname} {%jname}
Re: linefit & equation in the spool object
thanks! for your help :D
Who is online
Users browsing this forum: No registered users and 2 guests
