Login  Register

AW: 'Forest-plots' or Errror bar-charts in SPSS

Posted by nina on Aug 10, 2017; 9:31am
URL: http://spssx-discussion.165.s1.nabble.com/Forest-plots-or-Errror-bar-charts-in-SPSS-tp1070926p5734633.html

...of course! that helped! Thank you! Just one remaining question:

how could I flip the x- and y-axis (the y-axis woud refer to a string variable)?

Many thanks!

Nina


Von: Jon Peck [via SPSSX Discussion] <ml+[hidden email]>
Gesendet: Mittwoch, 9. August 2017 20:51:31
An: nina
Betreff: Re: 'Forest-plots' or Errror bar-charts in SPSS
 
You are missing the actual chart code.  Go back to that link and get the BEGIN GPL...END GPL. lines and add them to your syntax.

On Wed, Aug 9, 2017 at 12:08 PM, nina <[hidden email]> wrote:
Dear all,

my aim is to produce a forest plot with the study names (string variables)
situated along the y-axis
and horizontal error bars. The x-axis will refer to the size of the
correlation coefficients of the different studies.

It seems that the syntax pasted below which had been posted previously here
does not work for newer versions of SPSS... Specifically, an error message
pops up telling me that an "inline graph specification had been here
expected" but hadn't been found. Can anybody help me modyfying the syntax?
Many thanks in advance!

Best
Nina

***

http://spssx-discussion.1045642.n5.nabble.com/Forest-plots-or-Errror-bar-charts-in-SPSS-td1070926.html

***

DATA LIST LIST/ trial(F4) year(A5) study(A10) measure cilow ciup percwi(4
F8.3).
BEGIN DATA
 1 "1989" "Hodnett  " .502 .262  .962   4.940
 2 "1991" "Kennell  " .352 .216  .575   8.694
 3 "1992" "Bréart-Fr" .785 .483 1.276   8.878
 4 "1992" "Bréart-Bg" .811 .653 1.007  44.598
 5 "1997" "Gagnon   " .867 .573 1.311  12.237
 6 "1998" "Langer   " .280 .203  .384  20.654
 7 "    " "Total    " .594 .514  .687 100.000
END DATA.

A) Assuming you have SPSS 14:

SORT CASES BY trial(D).
STRING YearAndStudy(A30).
COMPUTE YearAndStudy=CONCAT(RTRIM(year)," ",study).
COMPUTE RefLine=1.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=YearAndStudy ciup cilow
measure percwi RefLine
  MISSING=LISTWISE REPORTMISSING=NO
 /GRAPHSPEC SOURCE=INLINE.




--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Forest-plots-or-Errror-bar-charts-in-SPSS-tp1070926p5734630.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Forest-plots-or-Errror-bar-charts-in-SPSS-tp1070926p5734631.html
To unsubscribe from 'Forest-plots' or Errror bar-charts in SPSS, click here.
NAML