Displaying 1 result from an estimated 1 matches for "eblest".
2009 Dec 26
2
Question regarding if statement in while loop
Hi all,
I'm running R version 2.9.2 on a PC.
I'm having a problem 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)...