search for: y_bar_vc

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

2010 Jul 30
2
conditonal "if"
Hi, I have problem with my R program. Actually, it just a simple program, but I do not know the error is. Here is part of my program: .... if (tau2ca==0) {MVvc <- 0.01} else {MVvc <- tau2ca} ri_vc <- si2/MVvc vi_vc <- ri_vc + 1 Y_bar_vc <- sum(y/vi_vc)/sum((1/vi_vc)) tau2MVvc <- sum((1/vi_vc)*(y - Y_bar_vc)^2)/(k-1) .... But then, there is an error displayed in workspace Error in if (tau2ca == 0) { : missing value where TRUE/FALSE needed I do not know why there is an error like that. I think I type the program correctly....