search for: reg70

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

Did you mean: reg0
2005 Sep 09
1
regression with restrictions - optimization problem
..., 1000,1000,5000,5000,2050, 0,1000,1000,5000,1972), ncol=5, byrow=T) colnames(a70)=c(paste("x", 1:4, sep=""), "med") a70 <- as.data.frame(a70) start=800; end=2000 step=10; u1000=start-step u1000 <- u1000+step # varying the 1000 entry a70[a70==1000] <- u1000 reg70 <- lm(a70$med ~ -1+x1+x2+x3+x4, data=a70) res <- sum( (reg70$residuals^2) ) for (i in 1:( (end-start)/step) ){ a70[a70==u1000] <- u1000+step u1000 <- u1000+step reg70 <- lm(a70$med ~ -1+x1+x2+x3+x4, data=a70) if (res >= sum( (reg70$residuals^2) )) {...