Spencer Graves | 2 May 15:07 2016

Uses of Normal Probability Plots


       Does anyone have a good reference on the uses of normal 
probability plots?

       The Wikipedia article on "Normal probability plot" includes 
histograms with normal plots of normal, right skewed, and uniformly 
distributed data.  I'd like to expand it to include examples with 
outliers, kurtosis, a need for transformations -- especially to 
log-normal -- and mixtures.  In addition, I'd like to include 
discussions of plotting, e.g., 15 effects from a 16-run 2-level 
fractional factorial identifying the significant effects as well as 
outliers.  I think the article should also discuss plotting multiple 
lines on the same plot to compare different samples and to search for 
heteroscedasticity.  And I'd like to show plots with datax = both TRUE 
and FALSE:  The default is FALSE.  However, that creates problems with 
visual processing with plots that are wider than they are tall, because 
research on cognitive processing of graphics indicates that human 
judgements about slope are more accurate with lines near 45 degrees that 
with other angles except for horizontal and vertical.  (I can find a 
reference;  I don't have it at my fingertips.)

       If I can't find such a paper on normal plots, I'd be happy to 
take the lead in writing one, but I'd like to have collaborators -- and 
preferably some confirmation from an R Journal editor that such an 
article would likely be favorably considered;  it may also need to 
include discussions of normal probability plotting with traditional 
graphics, lattice and ggplot2.

(Continue reading)

Bob Dobrow | 8 Apr 14:36 2016

New Stochastic Processes textbook Using R

Dear friends,

A new undergraduate-focused textbook on stochastic processes: Introduction to Stochastic Processes
With R (Wiley 2016)
is now available.

A focus of the book is simulation. The book includes an R tutorial and example script files.

Here is the link to the book's homepage: http://people.carleton.edu/~rdobrow/stochbook/

and to the Wiley page


If you would like more information, sample chapters, or have any questions, I would be happy to discuss.

Bob Dobrow
Department of Mathematics and Statistics
Carleton College
Northfield, MN 55057
rdobrow <at> carleton.edu

Whitt Kilburn | 15 Feb 16:23 2016

accessible introductions to ggplot2 for non stats/cs undergraduates?

Hello all,

Could anyone please refer me to your preferred introduction to the
components of ggplot()?

If you have notes online or handouts you provide your students, I would
sincerely appreciate seeing how you all introduce students to the syntax
and broader theory.

My students are primarily social science majors, but they have all
completed an introductory applied statistics course.

Really any thoughts on strategies or resources would be appreciated.

Thank you all very much for your time.

H. Whitt Kilburn
Associate Professor
Political Science Department
Grand Valley State University
Allendale, Michigan

	[[alternative HTML version deleted]]

Steven Stoline | 7 Jan 13:23 2016

Solve an Equation Including Integral

Dear All:

I am trying to solve an equation including an integral for unknown

Is this can be done in R? if so, any helps will be highly appreciated

### The following function is a function of t, given exi, nu, and alpha.


### I want to solve "[Integral(-Inf,100) fun(exi,nu,alpha)]-(1-alpha)=0"
for t.

### That is, find the value of t which satisfy the equation:

             [Integral(-Inf,100) fun(exi,nu,alpha)]-(1-alpha)=0

### for example given: alpha = 0.05, nu = 20 , exi = 0.5, Solve for t.

with many thanks

Steven M. Stoline
1123 Forest Avenue
Portland, ME 04112
sstoline <at> gmail.com

(Continue reading)

Steven Stoline | 31 Dec 19:31 2015

Histogram for Left Censored Data

Dear All:

*P.S.* I submitted this request to r-help <at> r-project.org , but did not get
any response. I am not sure, what is wrong. I already subscribe to this
list too.

I need helps with creating histograms for data that include left censored

Here is an example of left censored data


*Column 2* is an indicator for censoring "*1*" for left censored
observations and "*0*" for non-censored (fully measured) observations.

with many thanks


Steven M. Stoline
1123 Forest Avenue
Portland, ME 04112
sstoline <at> gmail.com

	[[alternative HTML version deleted]]

(Continue reading)

Steven Stoline | 27 Dec 07:42 2015

Land C. E., H-Factor used in the CI for the Lognormal Mean

Dear All:

I am wondering if there is a built-in R function or command to compute the
Land C. E. H-factor for computing the confidence interval on the lognormal
arithmetic mean. If not, I am not sure if someone wrote an R function to
read this H-factor. Any helps will be highly appreciated.

with many thanks

Steven M. Stoline
1123 Forest Avenue
Portland, ME 04112
sstoline <at> gmail.com

	[[alternative HTML version deleted]]

Steven Stoline | 26 Dec 12:02 2015

Re: Graph Two Series over Time

Dear Randall:

Thank you very much for the details and for your support and patience.

### This how are the original data look like:
### ---------------------------------------------------




The data values in red font are *Non-detected*. So I need to make
difference between these non-detected values and the detected ones in the

For example, solid circle for the detected ones, and open circles for the
non-detected one (the ones in red font).

So, I was trying to use pch for.

Please notice that, now, both data sets Well1 and Well2, and date have the
same length of 15, but Well1 has one NA, and Well2 has two NA.

Happy Holiday and Happy Christmas (if you are celebrating)

with many thanks
(Continue reading)

Steven Stoline | 24 Dec 13:51 2015

Graph Two Series over Time

Dear All:

I am trying to plot two series in one graph. But I have some difficulties
to set up the y-axis lim. Also, the second series is not correctly graphed.

*Here is what I tried to do:*

### Define 2 vectors


### Calculate range from 0 to max value of Well1 and Well2
### g_range <- range(0, Well1, Well2)

max_y <- max(Well1, Well2)

### Graph Groundwater Concentrations using y axis that ranges from 0 to max
### value in Well1 or Well2 vector.  Turn off axes and
### annotations (axis labels) so we can specify them yourself

plot(Well1, type="o", pch=c(0,0,15,15,0,15,15,15,15,15,15,15,15,15),
col="blue", ylim=c(0,max_y), axes=FALSE, ann=FALSE, , lwd=3, cex=1.25)  ###

### Make x axis using Jan 2005 - Dec 2008 labels

axis(1, at=1:14,

(Continue reading)

Steven Stoline | 22 Dec 09:36 2015

subsetting data with the median position

Dear All:

is there away for subsetting data by the median position?


*Data1: *2, 4, 8, 9,11,11,12  *(n is odd)*

*Data1: *2,4,8,9,11,11,12,15

*  (n is even)*
for Data1:

* I want to get:*

*lower half:      2    4    8*

*upper half:    11   11   12*

*for Data2: I want to get:*

*lower half:     2   4      8    9*

*upper half:   11   11   12   15*

with many thanks


(Continue reading)

John Maindonald | 28 Nov 08:34 2015

Re: Choice of graphics package

> "To do that effectively with lattice graphics you have to learn how to write panel functions"

There is an alternative mechanism that is usually easier.

The latticeExtra layering functions, due to Felix Andrews, overlay (or underlay) 
onto an existing trellis object.  The relevant functions are layer(), layer_(), 
glayer() (where there are groups), glayer_(), and as.layer().  The as.layer() 
function turns a trellis object into a layer that can then be ‘added' onto another
object.  The drawLayer() function provides a more interactive mechanism for 
achieving the same end.   These functions ought to be more widely known and
better advertised.  They are often easier to work with than panel functions.

My brief overview of these abilities can be found at:


Click on 'Layering in lattice’.

John Maindonald             email: john.maindonald <at> anu.edu.au

> On 28/11/2015, at 00:00, Drew Tyre <atyre2 <at> unl.edu> wrote:
> Message: 3
> Date: Thu, 26 Nov 2015 16:33:40 +0000
> From: Drew Tyre <atyre2 <at> unl.edu>
> To: "Granaas, Michael" <Michael.Granaas <at> usd.edu>, R-sig-teaching
> 	<r-sig-teaching <at> r-project.org>
> Subject: Re: [R-sig-teaching] Choice of graphics package
(Continue reading)

Drew Tyre | 26 Nov 17:33 2015

Re: Choice of graphics package

I use R to teach graduate students in the life sciences (mostly ecology but branching out). So far I show
students both lattice and base  graphics. I like lattice graphics for exploration because of the ease of
faceting plots. I use base graphics for "production plots" because I find it easier to tell people how to
add things to a base plot (multiple lines etc). To do that effectively with lattice graphics you have to
learn how to write panel functions, and that can be a mind bending experience (it was/is for me). 

I have not developed the facility with ggplot that I have with base graphics, so I can't comment on it. I think
if one comes to truly understand the ggplot model it will be better/faster/easier than either base or
lattice graphics, but it's a new model. I don't know which will be easier to teach to students hitting it
"cold". I'd be interested in hearing from people that have tried teaching ggplot to students with no prior

Drew Tyre

School of Natural Resources
University of Nebraska-Lincoln
416 Hardin Hall, East Campus
3310 Holdrege Street
Lincoln, NE 68583-0974

phone: +1 402 472 4054
fax: +1 402 472 2946
email: atyre2 <at> unl.edu

From: R-sig-teaching <r-sig-teaching-bounces <at> r-project.org> on behalf of Granaas, Michael <Michael.Granaas <at> usd.edu>
(Continue reading)