search for: q_rd

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

Did you mean: q_id
2012 Sep 11
4
R calculates small numbers, where the result should be zero
...tions, when the result should be zero. I have the following code: RD_Var1 <- ((0.1*(1-0.1))/100)+((0.2*(1-0.2))/100) RD_Var2 <- ((0.1*(1-0.1))/100)+((0.2*(1-0.2))/100) RD_1 <- 0.1-0.2 RD_1 RD_2 <- 0.1-0.2 FEM_Eff_RD <- ((1/RD_Var1)*RD_1+(1/RD_Var2)*RD_2)/(1/RD_Var1+1/RD_Var2) Q_RD <- 1/RD_Var1*((RD_1-FEM_Eff_RD)^2)+1/RD_Var2*((RD_2-FEM_Eff_RD)^2) Q_RD My result is: 1.540744e-31 When I put the calculated numbers directly into the last formula, I get zero, which is the correct answer: Q_RD <- 1/0.0025*((-0.1--0.1)^2)+1/0.0025*((-0.1--0.1)^2) Why does R calculate...