[R] boxplots of 1 datum AND comparing rank and boolean

Dan E. Kelley kelley at Phys.Ocean.Dal.CA
Wed Mar 15 00:29:57 CET 2000


Q: When R does 'plot()' in a context that yields boxplots, is there a
way to force it to draw something even if there are only 1 or two data
in the category?  I'd like for it to draw the data, perhaps using the
outlier symbols.  My code is (*** marks the line in question) is the
following, for R-1.0.0:

	d <- read.table("nserc-results-pgsb", header=FALSE, 
                         col.names=c("name","dept","rank","accept"))
	# These data look like:
	#   First.Student   Some.Department     1  1
	#   Second.Student  Another.Department  2  1
	#   Third.Student   Another.Department  3  0
	attach(d)
	rank.inv <- 1/rank
        ll <- lm(accept ~ rank.inv + dept, data=d)
	print(summary(ll))
	print(anova(ll))
	plot(dept,resid(ll))	# makes boxplots ***

Actually, if anybody has a bright idea how I should analyse such data,
I'd love to hear it.  As you can see in the above, I transformed to
1/rank since our committee recorded high 'rank' values for students we
favoured.  It's not clear to me how to compare rankings to boolean
(accept/deny) results, so the 'lm()' above might be silly.

Thanks in advance for any advice.  This group is so generous, it
amazes me.

PS: just because I think it's fun to read what sort of work folks are
doing, the above is work I'm doing in trying to analyze the patterns
in the granting of scholarships by NSERC, the science granting agency
in Canada.  I chair a committee at my university that ranks
postgraduate students and sends the files to NSERC.  While NSERC
nearly obeys our rankings, it seems to me that favour some
departments.  I'd like to test that (hence "accept ~ rank.inv + dept"
in the above).

Dan E. Kelley                   internet:   mailto:Dan.Kelley at Dal.CA
Oceanography Department         phone:                 (902)494-1694
Dalhousie University            fax:                   (902)494-2885
Halifax, NS, CANADA, B3H 4J1    http://www.phys.ocean.dal.ca/~kelley

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list