[R-sig-teaching] graphing circles

William Revelle lists at revelle.net
Mon Mar 26 05:55:58 CEST 2012


Perhaps I have too much time on my hands as I try to not think about my psychometrics course tomorrow:

library(psych)    #needed for the dia.ellipse function
#create a new function

"bullseye" <- function(x,y,n) {
for(i in 1:n) {dia.ellipse(x,y,e.size=i)}}

plot(NA,xlim=c(0,10),ylim=c(0,10),axes=FALSE,xlab="",ylab="")   #make a frame for the pictures

#Reliable and vallid
x=3
y=3
n=5
lim<-c(-.2,.2)
bullseye(x,y,4)
points(x+runif(n,lim[1],lim[2]),y+runif(n,lim[1],lim[2]),pch=16)

#reliable and invalid
x=7
y=3
bullseye(x,y,4)
points(x+1+runif(n,lim[1],lim[2]),y+1+runif(n,lim[1],lim[2]),pch=16)

#unreliable, but valid
x=5
y=8
n=5
lim<-c(-1,1)
bullseye(x,y,4)
points(x+runif(n,lim[1],lim[2]),y+runif(n,lim[1],lim[2]),pch=16)


Bill



On Mar 25, 2012, at 8:29 AM, Jeff Laux wrote:

> It doesn't seem silly to me; this is a standard figure/metaphor for teaching reliability & validity.  You could make such a figure in R, but I would probably just use a drawing program (e.g., Serif, which can be downloaded for free).  Alternatively, you could just search the internet for one, as I've seen several versions of this before.  -Jeff
> 
> 
> On 3/25/2012 8:59 AM, AbouEl-Makarim Aboueissa wrote:
>> Dear R users:
>> 
>> It may be a silly question. I am trying to create a target diagram of 4 circles inside each other and adding some dots to describe different situations of validity and reliability. I need three of them.
>> 
>> one with all dots around the target.
>> one with all dots in about one place, but far from the target.
>> one with randomly scattered dots.
>> 
>>  I tried my best, but could not succeed. Can someone help me with creating such graph.
>> 
>> Thank you very much
>> abou
>> 
>> 
>> 
>> ==========================
>> AbouEl-Makarim Aboueissa, Ph.D.
>> Associate Professor of Statistics
>> Graduate Program Coordinator
>> Department of Mathematics&  Statistics
>> University of Southern Maine
>> 96 Falmouth Street
>> P.O. Box 9300
>> Portland, ME 04104-9300
>> USA
>> 
>> 
>> Tel: (207) 228-8389
>> Fax: (207) 780-5607
>> Email: aaboueissa at usm.maine.edu
>>           aboueiss at yahoo.com
>> 
>> Office: 301C Payson Smith
>> 
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-teaching at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
>> 
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2012.0.1913 / Virus Database: 2114/4891 - Release Date: 03/24/12
>> 
>> 
> 
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
> 

William Revelle		           http://personality-project.org/revelle.html
Professor			           http://personality-project.org
Department of Psychology   http://www.wcas.northwestern.edu/psych/
Northwestern University	   http://www.northwestern.edu/
Use R for psychology             http://personality-project.org/r
It is 5 minutes to midnight	   http://www.thebulletin.org



More information about the R-sig-teaching mailing list