Construction of a Venn-diagram in SPSS with 4 circles - possible?

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

Construction of a Venn-diagram in SPSS with 4 circles - possible?

Staffan Lindberg

Dear list!

 

I seem to remember that Venn diagrams was discussed in this list several years ago but don’t remember the result. Is it possible to draw o Venn diagram with 4 circles overlapping to  various degrees in SPSS or does it require some special program and in that case which?

 

best

 

Staffan Lindberg

Sweden

Reply | Threaded
Open this post in threaded view
|

Re: Construction of a Venn-diagram in SPSS with 4 circles - possible?

Bruce Weaver
Administrator
You're right, this question was raised before.

  http://old.nabble.com/Venn-diagrams-in-SPSS--ts25328451.html#a25328451


Staffan Lindberg wrote
Dear list!



I seem to remember that Venn diagrams was discussed in this list several
years ago but don't remember the result. Is it possible to draw o Venn
diagram with 4 circles overlapping to  various degrees in SPSS or does it
require some special program and in that case which?



best



Staffan Lindberg

Sweden
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Construction of a Venn-diagram in SPSS with 4 circles - possible?

Albert-Jan Roskam
In reply to this post by Staffan Lindberg
Hi,

I made one Venn diagram with R v2.10. I tried running the code under spss v17.02 (which uses R 2.7) but it doesn't work.If you have spss v18, it might work. I will certainly work under R2.10. You can use up to 5 sets.

GET FILE='C:\\Program Files\\SPSSInc\\PASWStatistics17\\Samples\\English\\employee data.sav'.
BEGIN PROGRAM R.
library(gplots)
library(foreign)
#df <- spssdata.GetDataFromSPSS() # use this under spss
df <- read.spss('C:\\Program Files\\spss\\employee data.sav')
names(df) <- tolower(names(df))
df <- df[names(df) %in%  c("salary", "salbegin")]
attach(df)
items <- list(Salary=salary, Salbegin=salbegin)
venn(items)
END PROGRAM.

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Wed, 4/14/10, Staffan Lindberg <[hidden email]> wrote:

From: Staffan Lindberg <[hidden email]>
Subject: [SPSSX-L] Construction of a Venn-diagram in SPSS with 4 circles - possible?
To: [hidden email]
Date: Wednesday, April 14, 2010, 4:48 PM

Dear list!

 

I seem to remember that Venn diagrams was discussed in this list several years ago but don’t remember the result. Is it possible to draw o Venn diagram with 4 circles overlapping to  various degrees in SPSS or does it require some special program and in that case which?

 

best

 

Staffan Lindberg

Sweden


Reply | Threaded
Open this post in threaded view
|

Re: Construction of a Venn-diagram in SPSS with 4 circles - possible?

Jon K Peck

This package does work under V18 (with R2.8), but the diagram from the code below was rather unsatisfactory, because it did not draw all the set boundary lines.

But here is a version that yields a rather pleasing pattern.

GET FILE='C:\spss18\Samples\English\employee data.sav'.
compute rand1 = rv.normal(0,1).
compute rand2 = rv.normal(0,1).
compute rand3 = rv.normal(0,1).
compute rand4 = rv.normal(0,1).
BEGIN PROGRAM R.
library(gplots)
df <- spssdata.GetDataFromSPSS(variables="rand1 rand2 rand3 rand4")
items <- list(df$rand1,df$rand2, df$rand3,df$rand4)
venn(items)
END PROGRAM.

p.s. I would avoid using attach() like the plague.  It causes horrible pollution of the namespace in R.
(In my opinion, the R handling of namespaces is one of its biggest flaws.)
END PROGRAM.
Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Albert-Jan Roskam <[hidden email]>
To: [hidden email]
Date: 04/14/2010 01:47 PM
Subject: Re: [SPSSX-L] Construction of a Venn-diagram in SPSS with 4              circles -              possible?
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Hi,

I made one Venn diagram with R v2.10. I tried running the code under spss v17.02 (which uses R 2.7) but it doesn't work.If you have spss v18, it might work. I will certainly work under R2.10. You can use up to 5 sets.

GET FILE='C:\\Program Files\\SPSSInc\\PASWStatistics17\\Samples\\English\\employee data.sav'.
BEGIN PROGRAM R.
library(gplots)
library(foreign)
#df <- spssdata.GetDataFromSPSS() # use this under spss
df <- read.spss('C:\\Program Files\\spss\\employee data.sav')
names(df) <- tolower(names(df))
df <- df[names(df) %in%  c("salary", "salbegin")]
attach(df)
items <- list(Salary=salary, Salbegin=salbegin)
venn(items)
END PROGRAM.

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Wed, 4/14/10, Staffan Lindberg <[hidden email]> wrote:


From: Staffan Lindberg <[hidden email]>
Subject: [SPSSX-L] Construction of a Venn-diagram in SPSS with 4 circles - possible?
To: [hidden email]
Date: Wednesday, April 14, 2010, 4:48 PM

Dear list!

 

I seem to remember that Venn diagrams was discussed in this list several years ago but don’t remember the result. Is it possible to draw o Venn diagram with 4 circles overlapping to  various degrees in SPSS or does it require some special program and in that case which?

 

best

 

Staffan Lindberg

Sweden