[R] About lm(y~1)

Rui Barradas ruipbarradas at sapo.pt
Mon Apr 28 21:00:37 CEST 2014


Hello,

That will compute a "fit" with coefficient equal to mean(y) and std 
error equal to sd(y)/sqrt(length(y))

Hope this helps,

Rui Barradas

Em 28-04-2014 19:35, Alejo C.S. escreveu:
> Dear list,
> Reading a function I found this:
>
> lm ( y ~ 1 )
>
> I know that Y ~ -1 + A  is a straight-line with no y-intercept; that is, a
> fit forced through (0,0). But I never saw the first example. Any tip?
>
> Thanks in advance!
>
> C.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list