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 <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [R] ksmooth in SPLUS vs R Date: Mon, 22 Sep 2003 20:23:32 -0400
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.
jean,
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 (1988)
> 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 in
> 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 at
> 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 clarify
> the procedures in sm.regression()
>
> Jean,
>
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
_________________________________________________________________ �Est�s buscando un auto nuevo? http://www.yupimsn.com/autos/
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
