[From nobody Thu Oct 23 23:02:20 2008
Received: from mail172.messagelabs.com (216.82.254.3) by 767M-CAHT.goldbox.com
	(192.168.110.215) with Microsoft SMTP Server id 8.1.291.1;
	Thu, 23 Oct 2008 14:42:17 -0400
X-VirusChecked: Checked
X-Env-Sender: r-help-bounces@r-project.org
X-Msg-Ref: server-13.tower-172.messagelabs.com!1224787334!26007136!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,-
X-Originating-IP: [129.132.145.15]
X-SpamReason: No, hits=0.3 required=7.0 tests=RCVD_BY_IP
Received: (qmail 12907 invoked from network); 23 Oct 2008 18:42:16 -0000
Received: from hypatia.math.ethz.ch (HELO hypatia.math.ethz.ch)
	(129.132.145.15) by server-13.tower-172.messagelabs.com with AES256-SHA
	encrypted SMTP; 23 Oct 2008 18:42:16 -0000
Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NIfpe5014968;
	Thu, 23 Oct 2008 20:42:03 +0200
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hypatia.math.ethz.ch
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
	DKIM_VERIFIED,
	RCVD_IN_DNSWL_MED autolearn=unavailable version=3.2.5
Received: from phil1.ethz.ch (phil1.ethz.ch [129.132.202.242])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NIbhu9010365	for
	&lt;r-help@stat.math.ethz.ch&gt;; Thu, 23 Oct 2008 20:37:43 +0200
Received: from qw-out-2122.google.com ([74.125.92.26])	by phil1.ethz.ch with
	esmtp (Exim 4.66)	(envelope-from &lt;kingsfordjones@gmail.com&gt;) id
	1Kt543-0005yL-3L	for r-help@stat.math.ethz.ch; Thu, 23 Oct 2008 20:37:44
	+0200
Received: by qw-out-2122.google.com with SMTP id 5so169263qwi.29	for
	&lt;r-help@stat.math.ethz.ch&gt;; Thu, 23 Oct 2008 11:37:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:in-reply-to:mime-version:content-type
	:content-transfer-encoding:content-disposition:references;
	bh=WtbidXGp3yo+QfxUax1bqpBisuJ72+GxfzelrAoD7ik=;
	b=BgRN28drKEm8LTdTPbymPM3Lyy5oUTGzzC+zzPzW5df5REjtXWUD1x8HnnHUh3rbKV
	DLXdTq8BcJxwpbsevsGzuOrxjNdemRBy0Re9XdrsEBggPCdrRXF4gCw37zqOu8yaPKWB
	Rnchd+bxjgA9BdAB01us0CPmulzIrdRd9pU5M=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:in-reply-to:mime-version
	:content-type:content-transfer-encoding:content-disposition
	:references;
	b=ooKXTYIZIFEGUc3i7bN5D1+EKrxZcj9LVWKXe2Q+RaadygcMNGphhhSfoRx/wwL06u
	oHi+cHTcs6Nd/HWXVy2Wnr/GHYZWmVFs7nNX2rN2VWLugQX2xXV2EaJ9/IHAypIL/tEk
	k+deHdAA4/7VBz1AdLdsj2516NKzSkkUIP2kw=
Received: by 10.214.114.16 with SMTP id m16mr1769265qac.41.1224787045511; Thu,
	23 Oct 2008 11:37:25 -0700 (PDT)
Received: by 10.214.43.1 with HTTP; Thu, 23 Oct 2008 11:37:25 -0700 (PDT)
Message-ID: &lt;2ad0cc110810231137n66760e43i61bdd0c89622d040@mail.gmail.com&gt;
Date: Thu, 23 Oct 2008 12:37:25 -0600
From: Kingsford Jones &lt;kingsfordjones@gmail.com&gt;
To: &lt;r-help@stat.math.ethz.ch&gt;
In-Reply-To: &lt;9C3DC813-D08E-4141-B153-21A22E4A563B@plessthan.com&gt;
MIME-Version: 1.0
Content-Disposition: inline
References: &lt;9C3DC813-D08E-4141-B153-21A22E4A563B@plessthan.com&gt;
X-USF-Tag-Only: YES
X-USF-Filter-Node: phil1.ethz.ch
X-USF-Spam-Level: 
X-USF-Spam-Status: hits=-0.9 tests=BAYES_00,DNS_FROM_RFC_POST
X-USF-Spam-Flag: NO
X-USF: 
X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch
Subject: Re: [R] Calculating confidence limits for the difference between means
X-BeenThere: r-help@r-project.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: &quot;Main R Mailing List: Primary help&quot; &lt;r-help.r-project.org&gt;
List-Unsubscribe: &lt;https://stat.ethz.ch/mailman/options/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=unsubscribe&gt;
List-Archive: &lt;https://stat.ethz.ch/pipermail/r-help&gt;
List-Post: &lt;mailto:r-help@r-project.org&gt;
List-Help: &lt;mailto:r-help-request@r-project.org?subject=help&gt;
List-Subscribe: &lt;https://stat.ethz.ch/mailman/listinfo/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=subscribe&gt;
Content-Type: text/plain; charset=&quot;us-ascii&quot;
Content-Transfer-Encoding: 7bit
Sender: &lt;r-help-bounces@r-project.org&gt;
Errors-To: r-help-bounces@r-project.org
Return-Path: r-help-bounces@r-project.org
X-MS-Exchange-Organization-OriginalArrivalTime: 23 Oct 2008 18:42:17.0757 (UTC)
X-MS-Exchange-Organization-AuthSource: 767M-CAHT.goldbox.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-OriginalSize: 5966
X-MS-Exchange-Organization-Recipient-Limit-Verified: True

On Wed, Oct 22, 2008 at 11:09 AM, Dennis Fisher &lt;fisher@plessthan.com&gt; wrote:
&gt; Colleagues,
&gt;
&gt; I am working on a problem at the edge of my knowledge of statistics.
&gt;
&gt; Basically, I have values for two groups - I am trying to calculate the
&gt; 90% confidence limits for the difference between means.  I can
&gt; implement this without difficulty based on standard equations that are
&gt; available in stat textbooks: (difference between means) / (pooled
&gt; standard error)
&gt;
&gt; My problem arises when I try to correct for the value of a covariate.
&gt; I can do the ANOVA with the covariate as a factor.  But, I don't know
&gt; how to use the output to obtain the confidence limits of the difference.


Generally 'factor' refers to qualitative variables and 'covariate' to
quantitative, but if you are looking to estimate the difference in two
means using an ANCOVA perhaps something like...

fit &lt;- lm(y ~ trt + covar) # trt is a 2-level factor and covar is quantitative
confint(fit, level = .90)

hth,

Kingsford Jones


&gt;
&gt; I suspect that several participants in this board have implemented
&gt; code to so this.  I hope that someone is willing to share the code.
&gt;
&gt; Thanks in advance.
&gt;
&gt; Dennis
&gt;
&gt;
&gt; Dennis Fisher MD
&gt; P &lt; (The &quot;P Less Than&quot; Company)
&gt; Phone: 1-866-PLessThan (1-866-753-7784)
&gt; Fax: 1-415-564-2220
&gt; www.PLessThan.com
&gt;
&gt;
&gt;        [[alternative HTML version deleted]]
&gt;
&gt; ______________________________________________
&gt; R-help@r-project.org mailing list
&gt; https://stat.ethz.ch/mailman/listinfo/r-help
&gt; PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
&gt; and provide commented, minimal, self-contained, reproducible code.
&gt;

______________________________________________
R-help@r-project.org 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.
]