Thanks, Bill!
Bill
On Thu, Jun 17, 2010 at 5:12 PM, William Dunlap wrote:
>
> You can also define a function that keeps the cos
> and sin terms together so anova(fit) shows
> one entry for the (cos,sin) pair. E.g., define
> the following function
> cs <- function(x, freq)cbind(cos=cos(x*freq)
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
> Sent: Thursday, June 17, 2010 3:19 AM
> To: William Simpson
> Cc: r-help@r-project.org
> Subject: Re: [R] trigonometric regression
>
Got it now. I do
anova(lm(y~ 1),lm(y~ cf+sf))
Bill
__
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-contai
var(y)*length(y) I mean. (SSE)
Bill
On Thu, Jun 17, 2010 at 1:34 PM, William Simpson
wrote:
> Yes, I want the same test as is done for b[1] and b[2] in the summary
> table -- for H0: b[]==0.
>
> OK, do F-test on full model with cf and sf vs reduced model with intercept
> only.
> I want to test
Yes, I want the same test as is done for b[1] and b[2] in the summary
table -- for H0: b[]==0.
OK, do F-test on full model with cf and sf vs reduced model with intercept only.
I want to test
y~cf + sf
vs
y~ intercept (ie mean) -- I guess I just use var(y)
Thanks Duncan for your help
Bill
On T
William Simpson wrote:
Suppose I do a trigonometric regression
fit<-lm(y~ cf + sf)
where cf and sf are the cos and sine components.
b<-coef(fit)
I have the fitted sine component b[2] and the cos component b[3].
Doing summary(fit) gives me the p-values and SEs for b[2] and b[3].
But I want the a
Suppose I do a trigonometric regression
fit<-lm(y~ cf + sf)
where cf and sf are the cos and sine components.
b<-coef(fit)
I have the fitted sine component b[2] and the cos component b[3].
Doing summary(fit) gives me the p-values and SEs for b[2] and b[3].
But I want the amplitude of the fitted wa
7 matches
Mail list logo