s-news
[Top] [All Lists]

Re: a trival question on 'lm'

To: Savitri Appana <saviappana@yahoo.com>
Subject: Re: a trival question on 'lm'
From: Spencer Graves <spencer.graves@pdf.com>
Date: Wed, 15 Jun 2005 17:39:37 -0700
Cc: s-news@wubios.wustl.edu
In-reply-to: <20050615224546.38917.qmail@web51910.mail.yahoo.com>
References: <20050615224546.38917.qmail@web51910.mail.yahoo.com>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
          Have you considered the following:

set.seed(1)
df. <- data.frame(x=1:11, y=1:11+rnorm(11))
fit <- lm(y-x~x, data=df.)
anova(fit)
summary(fit)

          hope this helps.
          spencer graves

Savitri Appana wrote:

Hello everyone,

I've ran a simple linear model with no intercept.  I
would like to specify a test, something like 'x = 1
(instead of 0, the default)'.  How to acheive this in
Splus?  I was able to do this in SAS with a 'test'
statement in proc reg, but i'm interested in doing it
using Splus.  Any help is appreciated, thank you.

e.g. --
lm(formula = y ~ x , data = data)

Coefficients:
Value Std. Error t value Pr(>|t|) x 0.4149 0.1668 2.4875 0.0146

Thanks for yr help,
Savi


                
__________________________________ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>