Displaying 1 result from an estimated 1 matches for "sigma2ei".
Did you mean:
sigma2
2009 Dec 26
2
Question regarding if statement in while loop
...oblem with a loop, and have tried using an if statement
within to fix it, but to no avail.
Any advice would be appreciated.
Here is my code:
*****************************************************
eblest <- function(i,dir, sterr, weight, aux) {
n <- nrow(dir)
Y <- as.matrix(dir[,i], ncol=1)
sigma2ei <- as.matrix(sterr[,i]^2, ncol=1)
w <- as.matrix((weight[,3])*(sigma2ei), ncol=1)
X <- as.matrix(subset(aux, select=c(3,5:7,9:10,13)))
a <<- EBLUP.area(Y,cbind(w,1),sigma2ei,n) #The EBLUP.area
function is a function already in R.
}
# It gives a bunch of outpu...