search for: biais

Displaying 1 result from an estimated 1 matches for "biais".

Did you mean: biaix
2007 Feb 27
1
interactions and GAM
...se(data1$x1=="1",data1$x2,mean(data1$x2_1,na.rm=TRUE)) Ndata$x2_2=ifelse(data1$x1=="2",data1$x2,mean(data1$x2_2,na.rm=TRUE)) Ndata$x2_3=ifelse(data1$x1=="3",data1$x2,mean(data1$x2_3,na.rm=TRUE)) predict(model,Ndata)-predict(model) #as you can see there is a systematic biais #correct way to predict (=returned 0 for terms with NA value): p=predict(model,data1,type="term") rowSums(cbind(p,attr(p,"constant")),na.rm=TRUE)-predict(model) #alternative solution, 0 instead of NA data1$v1=ifelse(data1$x1=="1",data1$x2,0) data1$v2=ifelse(data1$x1=...