Re: [R] CI with sd

2006-10-20 Thread Petr Pikal
Hi

On 19 Oct 2006 at 13:19, Ethan Johnsons wrote:

Date sent:  Thu, 19 Oct 2006 13:19:40 -0400
From:   Ethan Johnsons [EMAIL PROTECTED]
To: Chuck Cleland [EMAIL PROTECTED]
Copies to:  r-help@stat.math.ethz.ch
Subject:Re: [R] CI with sd

 I thought of another interesting scenario, and I would just go ahead
 and ask this. I have a mean (i.e. 26.2) where the number of e coli
 samples is 250. The mean is already calculated, so it is a discrete
 value, not series.
 
 What fucntion can be used for the calc with CI i.e. 90%?

With some sd value and assuming normal distribution

26.2+qnorm(.95)*sd/sqrt(250)
26.2-qnorm(.95)*sd/sqrt(250)

as you can find in statistical textbooks.

But without having sd value?

HTH
Petr


 
 thx much,
 
 ej
 
 On 10/19/06, Chuck Cleland [EMAIL PROTECTED] wrote:
  Ethan Johnsons wrote:
   Please let me ask you another quick question.
   I have results for e coli, and am trying to get 95% CI with the sd
   (1.783956). I got the result from another tool as (1.21, 3.42).
   But, I like to verify it with R.  What function do you use for
   this?
  
   e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
   sd(e.coli, na.rm = FALSE)
   [1] 1.783956
  
   Sorry for the newbie question.
 
  e.coli - c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
  library(nlme)
  mod1 - gls(e.coli ~ 1)
  intervals(mod1)
 
  Approximate 95% confidence intervals
 
   Coefficients:
 lower est.upper
  (Intercept) 24.16206 25.5 26.90460
  attr(,label)
  [1] Coefficients:
 
   Residual standard error:
 lower est.upper
  1.204986 1.783956 3.417651
 
   thx much
  
   ej
  
   __
   R-help@stat.math.ethz.ch mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide
   http://www.R-project.org/posting-guide.html and provide commented,
   minimal, self-contained, reproducible code.
 
  --
  Chuck Cleland, Ph.D.
  NDRI, Inc.
  71 West 23rd Street, 8th floor
  New York, NY 10010
  tel: (212) 845-4495 (Tu, Th)
  tel: (732) 512-0171 (M, W, F)
  fax: (917) 438-0894
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html and provide commented,
 minimal, self-contained, reproducible code.

Petr Pikal
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CI with sd

2006-10-20 Thread Ethan Johnsons
Thank you so much.
I see your point.

ej

On 10/20/06, Petr Pikal [EMAIL PROTECTED] wrote:
 Hi

 On 19 Oct 2006 at 13:19, Ethan Johnsons wrote:

 Date sent:  Thu, 19 Oct 2006 13:19:40 -0400
 From:   Ethan Johnsons [EMAIL PROTECTED]
 To: Chuck Cleland [EMAIL PROTECTED]
 Copies to:  r-help@stat.math.ethz.ch
 Subject:Re: [R] CI with sd

  I thought of another interesting scenario, and I would just go ahead
  and ask this. I have a mean (i.e. 26.2) where the number of e coli
  samples is 250. The mean is already calculated, so it is a discrete
  value, not series.
 
  What fucntion can be used for the calc with CI i.e. 90%?

 With some sd value and assuming normal distribution

 26.2+qnorm(.95)*sd/sqrt(250)
 26.2-qnorm(.95)*sd/sqrt(250)

 as you can find in statistical textbooks.

 But without having sd value?

 HTH
 Petr


 
  thx much,
 
  ej
 
  On 10/19/06, Chuck Cleland [EMAIL PROTECTED] wrote:
   Ethan Johnsons wrote:
Please let me ask you another quick question.
I have results for e coli, and am trying to get 95% CI with the sd
(1.783956). I got the result from another tool as (1.21, 3.42).
But, I like to verify it with R.  What function do you use for
this?
   
e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
sd(e.coli, na.rm = FALSE)
[1] 1.783956
   
Sorry for the newbie question.
  
   e.coli - c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
   library(nlme)
   mod1 - gls(e.coli ~ 1)
   intervals(mod1)
  
   Approximate 95% confidence intervals
  
Coefficients:
  lower est.upper
   (Intercept) 24.16206 25.5 26.90460
   attr(,label)
   [1] Coefficients:
  
Residual standard error:
  lower est.upper
   1.204986 1.783956 3.417651
  
thx much
   
ej
   
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented,
minimal, self-contained, reproducible code.
  
   --
   Chuck Cleland, Ph.D.
   NDRI, Inc.
   71 West 23rd Street, 8th floor
   New York, NY 10010
   tel: (212) 845-4495 (Tu, Th)
   tel: (732) 512-0171 (M, W, F)
   fax: (917) 438-0894
  
  
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html and provide commented,
  minimal, self-contained, reproducible code.

 Petr Pikal
 [EMAIL PROTECTED]



__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] CI with sd

2006-10-19 Thread Ethan Johnsons
Please let me ask you another quick question.
I have results for e coli, and am trying to get 95% CI with the sd (1.783956).
I got the result from another tool as (1.21, 3.42).
But, I like to verify it with R.  What function do you use for this?

 e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
 sd(e.coli, na.rm = FALSE)
[1] 1.783956

Sorry for the newbie question.

thx much

ej

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CI with sd

2006-10-19 Thread Chuck Cleland
Ethan Johnsons wrote:
 Please let me ask you another quick question.
 I have results for e coli, and am trying to get 95% CI with the sd (1.783956).
 I got the result from another tool as (1.21, 3.42).
 But, I like to verify it with R.  What function do you use for this?
 
 e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
 sd(e.coli, na.rm = FALSE)
 [1] 1.783956
 
 Sorry for the newbie question.

e.coli - c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
library(nlme)
mod1 - gls(e.coli ~ 1)
intervals(mod1)

Approximate 95% confidence intervals

 Coefficients:
   lower est.upper
(Intercept) 24.16206 25.5 26.90460
attr(,label)
[1] Coefficients:

 Residual standard error:
   lower est.upper
1.204986 1.783956 3.417651

 thx much
 
 ej
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CI with sd

2006-10-19 Thread Ethan Johnsons
Thx so much, Chuck.

R is a reallt sweet tool to use..

I can try many things with i.e. intervals (gls(e.coli ~ 1), level=0.90).
It is a great help.

ej

On 10/19/06, Chuck Cleland [EMAIL PROTECTED] wrote:
 Ethan Johnsons wrote:
  Please let me ask you another quick question.
  I have results for e coli, and am trying to get 95% CI with the sd 
  (1.783956).
  I got the result from another tool as (1.21, 3.42).
  But, I like to verify it with R.  What function do you use for this?
 
  e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
  sd(e.coli, na.rm = FALSE)
  [1] 1.783956
 
  Sorry for the newbie question.

 e.coli - c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
 library(nlme)
 mod1 - gls(e.coli ~ 1)
 intervals(mod1)

 Approximate 95% confidence intervals

  Coefficients:
lower est.upper
 (Intercept) 24.16206 25.5 26.90460
 attr(,label)
 [1] Coefficients:

  Residual standard error:
lower est.upper
 1.204986 1.783956 3.417651

  thx much
 
  ej
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

 --
 Chuck Cleland, Ph.D.
 NDRI, Inc.
 71 West 23rd Street, 8th floor
 New York, NY 10010
 tel: (212) 845-4495 (Tu, Th)
 tel: (732) 512-0171 (M, W, F)
 fax: (917) 438-0894



__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CI with sd

2006-10-19 Thread Ethan Johnsons
I thought of another interesting scenario, and I would just go ahead
and ask this.
I have a mean (i.e. 26.2) where the number of e coli samples is 250.
The mean is already calculated, so it is a discrete value, not series.

What fucntion can be used for the calc with CI i.e. 90%?

thx much,

ej

On 10/19/06, Chuck Cleland [EMAIL PROTECTED] wrote:
 Ethan Johnsons wrote:
  Please let me ask you another quick question.
  I have results for e coli, and am trying to get 95% CI with the sd 
  (1.783956).
  I got the result from another tool as (1.21, 3.42).
  But, I like to verify it with R.  What function do you use for this?
 
  e.coli=c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
  sd(e.coli, na.rm = FALSE)
  [1] 1.783956
 
  Sorry for the newbie question.

 e.coli - c(27.5,24.6,25.3,28.7,23,26.8,24.7,24.3,24.9)
 library(nlme)
 mod1 - gls(e.coli ~ 1)
 intervals(mod1)

 Approximate 95% confidence intervals

  Coefficients:
lower est.upper
 (Intercept) 24.16206 25.5 26.90460
 attr(,label)
 [1] Coefficients:

  Residual standard error:
lower est.upper
 1.204986 1.783956 3.417651

  thx much
 
  ej
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

 --
 Chuck Cleland, Ph.D.
 NDRI, Inc.
 71 West 23rd Street, 8th floor
 New York, NY 10010
 tel: (212) 845-4495 (Tu, Th)
 tel: (732) 512-0171 (M, W, F)
 fax: (917) 438-0894



__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.