Dear memberships,


I'm trying to estimate the following multivariate local regression model using 
the "locfit" package:



BMI=m1(RCC)+m2(WCC)



where (m1) and (m2) are unknown smooth functions.



My problem is that once I get the regression done I cannot get the fitted 
values of each of this smooth functions (m1) and (m2). My program is the 
following:



library(locfit)

data(ais)
fit2<-locfit.raw(x=lp(ais$RCC,h=0.5,deg=1)+lp(ais$WCC,deg=1,h=0.75),y=ais$BMI,ev=dat(),kt="prod",kern="gauss")
g21<-predict(fit2,type="terms")



If I done this on the computer the results of (g21) is a vector of results when 
I should have a matrix with 2 columns (one for each fitted smooth function).



Please, somebody knows how I can get the fiitted values of both smooth 
functions (m1) and (m2) using a local linear regression with kernel weights as 
this example?



thanks a lot in advance.

Alexandra

        [[alternative HTML version deleted]]

______________________________________________
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-contained, reproducible code.

Reply via email to