-requ...@r-project.org; r-help@r-project.org
> Subject: [R] Question about linear regression in R
>
> Hi all,
> I wrote a r program as below:
>
> x <- 1:10
> y <- c(3,3,3,3,3,3,3,3,3,3)
>
> fit <- lm(log(y) ~ x)
> summary(fit)
>
> And I expect to ge
On Nov 14, 2011, at 10:49 PM, Miles Yang wrote:
Hi all,
I wrote a r program as below:
x <- 1:10
y <- c(3,3,3,3,3,3,3,3,3,3)
fit <- lm(log(y) ~ x)
summary(fit)
And I expect to get some error message from R, because "y" is
constant.
But, I got the message as below:
You are asking R to tel
What exactly is it that's worrying you? It's a problematic regression
for a few reasons, but ultimately it seems pretty ok, though I'd be
ever so slightly worried about the R^2 value being misinterpreted.
Michael
On Mon, Nov 14, 2011 at 10:49 PM, Miles Yang wrote:
> Hi all,
> I wrote a r program
Hi all,
I wrote a r program as below:
x <- 1:10
y <- c(3,3,3,3,3,3,3,3,3,3)
fit <- lm(log(y) ~ x)
summary(fit)
And I expect to get some error message from R, because "y" is constant.
But, I got the message as below:
> summary(fit)
Call:
lm(formula = log(y) ~ x)
Residuals:
Min 1
4 matches
Mail list logo