Displaying 2 results from an estimated 2 matches for "finalfit".
Did you mean:
finalfit4
2012 Oct 06
0
SPM/SemiPar -- Plotting additive interactions
I'm taking the residual-regression approach to semiparametric estimation
(Robinson 1988, Econometrica), and basically using SemiPar simply as a
convenient means of doing multivariate nonparamteric additive models.
The final bit of code is here:
finalfit <-
spm(res~f(V3,basis="trunc.poly")+f(V5,basis="trunc.poly")+f(V6,basis="trunc.poly"))
summary(finalfit)
par(mfrow = c(2,2))
plot(finalfit)
you can see the plot here: http://i.imgur.com/qaPc8.png
V3 is a main effect, V5 and V6 are interactions between dummy vari...
2012 Mar 03
1
Problem running stepAIC within a function.
...1+new1+exnew1+hand1+excise1+
merch1+exmerch1+tob1+rub1+water1+turn2+exturn2+new2+exnew2+hand2+excise2+merch2+exmerch2+tob2+rub2+water2,lower=~-1+SIC),
direction="both"))
sigdata <-
cbind(new=s1$new,SIC=s1$SIC,s1[,coeffs[which(summary(fit)$coeff[-c(1:128),4]
<= 0.05)]])
finalfit <- lm(new~.-1,data=sigdata,weights=w)
}
else {
fit <-
lm(stepAIC(lm(new~-1+SIC3+emp,data=s1),scope=list(upper=~1+SIC3+emp+turn+exturn+new+exnew+hand+excise+merch+exmerch+tob+rub+water+turn1+exturn1+new1+exnew1+
hand1+excise1+merch1+exmerch1+tob1+rub1+water1+turn2+exturn2+new2+exnew...