[R] ANOVA(L, Terms...)
Francisco J. Zagmutt Vergara
fzagmutt at hotmail.com
Tue Sep 23 03:19:26 CEST 2003
I have a lm object with 4 parameters and I want to test wether 2 parameters
are equal using a Wald test (basically b1=b2 or b1-b2 =0). In the help file
from R it says that under ANOVA the optional arguments " Terms" or "L" test
whether a linear combination is equal to 0. I tried;
>anova(m1, Terms = Beta1-Beta2=0) but I get the error:
Object " Beta1" must be assigned locally before replacement.
I also tried
>anova (m1, Terms = 1-2 = 0) and I get:
Invalid assginment: No object name : 1-2 = 0
What am I doing wrong?
Thanks for your help!!
>From: Jean Eid <jeaneid at chass.utoronto.ca>
>To: r-help at stat.math.ethz.ch
>Subject: Re: [R] ksmooth in SPLUS vs R Date: Mon, 22 Sep 2003 20:23:32
>Please do forget my questions as they are really trivial and I do not kno
>what I was thinking of.
>Thank you thomas for clarifying my cloudy head today.
>On Mon, 22 Sep 2003, Jean Eid wrote:
> > I am working with a model that I have to estimate a nonparametric
> > function. The model is partial linear i.e.
> > Y=X$\beta$ + f(z) + $\epsilon$
> > I am using the ' double residual methods' Robinson (1988) Speckman
> > where I estimate a nonparametric function for each of the parametric
> > variables in terms of the nonparametric one i.e.
> > X[,i]=g(Z)+ u
> > this is done because I need the $E( X[,i]\vert Z)$ for each position j
> > the vectors.
> > the problem is that when I use the ksmooth() function in R it estimates
> > the function at different points and not those that consist of the Z
> > vector.
> > the ksmooth() function in Splus on the other hand evaluates the points
> > the corresponding Z vector. both codes are given below
> > d<-ksmooth(lprice,XX[,i],kernel="box")
> > unique(lprice-d$x)
> > in SPLUS will generate 0 while in R it generates a vector of different
> > values.
> > My second question is regarding the sm library:
> > d<-sm.regression(lprice, XX[,i], h=sd(lprice), display="none")
> > will only generate 50 point estimates while NROW(XX[,i]) = 3897
> > and when I do
> > d<-sm.regression(lprice, XX[,i], h=sd(lprice), display="none",
> > ngrid=NROW(lprice))
> > I get the right dimension of the estimated points but again they are not
> > estimated at the points in lprice.
> > Any help is greatly appreciated.
> > P.S. I have Bowman and Azzalini book but unfortunately it does not
> > the procedures in sm.regression()
> > Jean,
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>R-help at stat.math.ethz.ch mailing list
¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/
More information about the R-help