Forest Plots

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Forest Plots

Paola Chivers-2

Hi,

 

Further to my last email ... I have discovered that the graph I want to create is called a Forest Plot.  It is usually done as a result of a meta-analysis.  I have confirmed that excel does not have the functionality to do this.  However for those who might be interested my supervisor found : add-on for doing Meta analysis in Excel and will draw a Forest plot: http://www.jstatsoft.org/v30/i07.

 

Can anyone tell me if I can create a Forest Plot in SPSS?  If so I would appreciate some help on how.

 

Regards,

Paola

 

From: Paola Chivers [mailto:[hidden email]]
Sent: Tuesday, 9 June 2009 5:05 PM
To: '[hidden email]'
Subject: graphing odds ratio with CI intervals

 

Hi,

 

Is there a way of graphing the odds ratio [Exp(B)] with the upper and lower bounds [95% CI intervals] that result from a multinomial logistic regression?

 

I assume I must have to save variables and then run the graph function??? 

 

Regards,

Paola

 

“Ours has become a time-poor society, fatigued by non-physical demands and trying to compartmentalize daily living tasks.  It is small wonder that physical activity is discarded in this environment” p126 (Steinbeck, 2001)

 

P Please consider the environment before printing this email.

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Forest Plots

Marta Garcia-Granero
This is the code I  use for forest plots in meta-analysis:

* Sample dataset *.
DATA LIST LIST/ trial(F4) year(A5) study(A10) measure semeasur cilow
ciup percwi(5 F8.3).
BEGIN DATA
 1 1992 Bréart-Fr .785 .248 .483 1.276   8.878
 2 1992 Bréart-Bg .811 .111 .653 1.007  44.598
 3 1997 Gagnon    .867 .211 .573 1.311  12.237
 4 1989 Hodnett   .502 .332 .262  .962   4.940
 5 1991 Kennell   .352 .250 .216  .575   8.694
 6 1998 Langer    .280 .162 .203  .384  20.654
 7 ---- Total     .594 .074 .514  .687 100.000
END DATA.
SORT CASES BY trial(D).
VAR LABEL cilow 'Lower 95%CI' /ciup 'Upper 95%CI' /measure 'OR'
/percwi'Weights(%)'.

* GPL code (with thanks to Jon Peck, Viann Beadle and David Matheson) *.
GGRAPH
 /GRAPHDATASET NAME="graphdataset" VARIABLES=study ciup cilow measure percwi
 MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE TEMPLATE="C:\Temp\Forest1.sgt".
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA:   study=col(source(s),   name("study"), unit.category())
DATA:   ciup=col(source(s),    name("ciup"))
DATA:   cilow=col(source(s),   name("cilow"))
DATA:   measure=col(source(s), name("measure"))
DATA:   percwi=col(source(s),  name("percwi"))
GUIDE:  text.title(label("Forest plot"))
SCALE:  cat(dim(1))
SCALE:  log(dim(2))
COORD:  rect(dim(1,2),transpose())
ELEMENT: interval(position(region.spread.range(study*(cilow+ciup))),
shape(shape.line))
ELEMENT: point(position(study*measure), shape(shape.square), size(percwi))
END GPL.

* This is the content of the chart template "Forest1.sgt" (used for some
formatting of the graph)
  Copy it, paste into an empty window and save it in C:\Temp with that
name *.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<template SPSS-Version="2.2" selectPath="87 2 30 97 98 12 13 21 900 "
xmlns="http://xml.spss.com/spss/visualization"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xml.spss.com/spss/visualization
http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd">
 <setAxisStyle categorical="true" role="x">
  <label>Study name</label>
  <style color="#000000" stroke-width="0.5pt" visible="true"/>
 </setAxisStyle>
 <setAxisStyle categorical="false" role="y">
  <label> Favours treatment                 Favours Control</label>
  <style color="#000000" stroke-width="0.5pt" visible="true"/>
 </setAxisStyle>
 <addFrame count="1" type="visualization">
  <location bottom="556px" left="0px" right="433px" top="0px"/>
  <style color="#ffffff" color2="transparent" number="0" visible="true"/>
  <style font-family="SansSerif" font-size="8pt" number="1" pattern="0"
stroke-linecap="butt" text-fit="true" visible="true"/>
 </addFrame>
 <setErrorBarOptions>
  <style color="#000000" color2="#000000" depth="75%" pattern="0"
stroke-width="0.25pt" symbol="line" visible="true" width="0.25pt"/>
 </setErrorBarOptions>
 <addReferenceLine styleOnly="false" y="1.0" ycategorical="false">
  <style stroke-dasharray="3px,2px" visible="true" width="1pt"/>
 </addReferenceLine>
 <addFrame count="1" styleOnly="true" type="legend">
  <style color="transparent" color2="transparent" visible="false"/>
  <style color="transparent" color2="transparent" number="0"
visible="false"/>
 </addFrame>
 <addFrame count="1" styleOnly="true" type="graph">
  <style color="transparent" color2="transparent" visible="true"/>
  <style color="#f0f0f0" color2="#000000" number="1" visible="true"/>
 </addFrame>
 <setStyle subtype="simple" type="scatter">
  <style color="#000000" color2="#000000" symbol="square" visible="true"/>
 </setStyle>
</template>


Paola Chivers wrote:
>
>
>
> Can anyone tell me if I can create a Forest Plot in SPSS?  If so I
> would appreciate some help on how.
>
>
>

HTH,
Marta García-Granero

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Forest Plots

Paola Chivers-2
WOW!  Thanks.  I will give this a whirl.

Regards,
Paola

“Ours has become a time-poor society, fatigued by non-physical demands and trying to compartmentalize daily living tasks.  It is small wonder that physical activity is discarded in this environment” p126 (Steinbeck, 2001)

 Please consider the environment before printing this email.



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Marta García-Granero
Sent: Wednesday, 10 June 2009 4:26 PM
To: [hidden email]
Subject: Re: Forest Plots

This is the code I  use for forest plots in meta-analysis:

* Sample dataset *.
DATA LIST LIST/ trial(F4) year(A5) study(A10) measure semeasur cilow
ciup percwi(5 F8.3).
BEGIN DATA
 1 1992 Bréart-Fr .785 .248 .483 1.276   8.878
 2 1992 Bréart-Bg .811 .111 .653 1.007  44.598
 3 1997 Gagnon    .867 .211 .573 1.311  12.237
 4 1989 Hodnett   .502 .332 .262  .962   4.940
 5 1991 Kennell   .352 .250 .216  .575   8.694
 6 1998 Langer    .280 .162 .203  .384  20.654
 7 ---- Total     .594 .074 .514  .687 100.000
END DATA.
SORT CASES BY trial(D).
VAR LABEL cilow 'Lower 95%CI' /ciup 'Upper 95%CI' /measure 'OR'
/percwi'Weights(%)'.

* GPL code (with thanks to Jon Peck, Viann Beadle and David Matheson) *.
GGRAPH
 /GRAPHDATASET NAME="graphdataset" VARIABLES=study ciup cilow measure percwi
 MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE TEMPLATE="C:\Temp\Forest1.sgt".
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA:   study=col(source(s),   name("study"), unit.category())
DATA:   ciup=col(source(s),    name("ciup"))
DATA:   cilow=col(source(s),   name("cilow"))
DATA:   measure=col(source(s), name("measure"))
DATA:   percwi=col(source(s),  name("percwi"))
GUIDE:  text.title(label("Forest plot"))
SCALE:  cat(dim(1))
SCALE:  log(dim(2))
COORD:  rect(dim(1,2),transpose())
ELEMENT: interval(position(region.spread.range(study*(cilow+ciup))),
shape(shape.line))
ELEMENT: point(position(study*measure), shape(shape.square), size(percwi))
END GPL.

* This is the content of the chart template "Forest1.sgt" (used for some
formatting of the graph)
  Copy it, paste into an empty window and save it in C:\Temp with that
name *.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<template SPSS-Version="2.2" selectPath="87 2 30 97 98 12 13 21 900 "
xmlns="http://xml.spss.com/spss/visualization"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xml.spss.com/spss/visualization
http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd">
 <setAxisStyle categorical="true" role="x">
  <label>Study name</label>
  <style color="#000000" stroke-width="0.5pt" visible="true"/>
 </setAxisStyle>
 <setAxisStyle categorical="false" role="y">
  <label> Favours treatment                 Favours Control</label>
  <style color="#000000" stroke-width="0.5pt" visible="true"/>
 </setAxisStyle>
 <addFrame count="1" type="visualization">
  <location bottom="556px" left="0px" right="433px" top="0px"/>
  <style color="#ffffff" color2="transparent" number="0" visible="true"/>
  <style font-family="SansSerif" font-size="8pt" number="1" pattern="0"
stroke-linecap="butt" text-fit="true" visible="true"/>
 </addFrame>
 <setErrorBarOptions>
  <style color="#000000" color2="#000000" depth="75%" pattern="0"
stroke-width="0.25pt" symbol="line" visible="true" width="0.25pt"/>
 </setErrorBarOptions>
 <addReferenceLine styleOnly="false" y="1.0" ycategorical="false">
  <style stroke-dasharray="3px,2px" visible="true" width="1pt"/>
 </addReferenceLine>
 <addFrame count="1" styleOnly="true" type="legend">
  <style color="transparent" color2="transparent" visible="false"/>
  <style color="transparent" color2="transparent" number="0"
visible="false"/>
 </addFrame>
 <addFrame count="1" styleOnly="true" type="graph">
  <style color="transparent" color2="transparent" visible="true"/>
  <style color="#f0f0f0" color2="#000000" number="1" visible="true"/>
 </addFrame>
 <setStyle subtype="simple" type="scatter">
  <style color="#000000" color2="#000000" symbol="square" visible="true"/>
 </setStyle>
</template>


Paola Chivers wrote:
>
>
>
> Can anyone tell me if I can create a Forest Plot in SPSS?  If so I
> would appreciate some help on how.
>
>
>

HTH,
Marta García-Granero

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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

=====================
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