Displaying 2 results from an estimated 2 matches for "coefsum".
2004 Mar 26
3
regression problem
i need to know how to estimate a linear regression whose coefficients sum
to zero
2012 Apr 23
0
linear model benchmarking
...]; x <- x[ok]
b <- cov(y,x)/var(x)
c(mean(y) - b*mean(x), b)
}
}
cat("\n")
## make sure we do the NaN checks
x[1,1,1] <- NA
y[2,2] <- NA
options(digits=2)
time.factor.first <- first.checksum <- NA
for (ctr in 1:length(ols)) {
invisible({gc(); gc(); gc()})
coefsum <- 0.0
v <- system.time(for (mc in 1:MC) coefsum <- coefsum +
ols[[ctr]](y[,mc], x[,,mc]))
thiscoefsum <- sum(abs(coefsum))
thistime <- sum(as.numeric(v)[1:2])/MC
if (is.na(time.factor.first)) time.factor.first <- thistime
if (is.na(first.checksum)) first.checksum <-...