8
$\begingroup$

After running the lm regression model using R, sometime one is bound to get very small P values or values in the covariance matrix. Something of the sort: -1.861246e-04 for example in a covariance matrix. My question is how do you read this? how could I perform calculations on it manually? I needed to multiply this covariance matrix out with a vector but since I do not know how to manipulate those numbers, I am lost.

$\endgroup$
  • 6
    $\begingroup$ @Gordon Smyth Did O.P. really get : -1.861246e-04 for p-value? That is a negative number for p-value. Is that possible? $\endgroup$ – Mark L. Stone Dec 19 '17 at 22:28
  • $\begingroup$ minus one point eight six times ten to the [power of] minus four $\endgroup$ – Henry Dec 20 '17 at 10:29
12
$\begingroup$

The "e" is a symbol for base-10 scientific notation. The "e" stands for $\times 10^{\rm exponent}$. So -1.861246e-04 means $-1.861246 \times 10^{-4}$. In fixed-point notation that would be -0.0001861246.

This notation is pretty standard. Even Microsoft Excel understands it, not just R.

$\endgroup$
  • $\begingroup$ Thank you. Just means I'm going to have a lot of decimals in my manual calculation. $\endgroup$ – dc3rd Dec 19 '17 at 22:07
  • 2
    $\begingroup$ @dc3rd You don't need to. Scientific notation was developed because it is useful. You should perform calculations with just the numbers, and multiply the powers of ten separately. For example, 2e-5 * 8e-3 = (2*8)e(-5-3) = 16e-8 = 1.6e-7 $\endgroup$ – Ant Dec 20 '17 at 9:11
8
$\begingroup$

I cannot yet comment so this answer will be a response to @Mark L. Stone : OP also stated that he's getting covariance matrix values in the scientific notation. Obviously the negative value must be one of the covariances.

To not be completely OT I will just add that working with scientific notation to me looks a bit clunky(especially if you are publishing the results). To supress the notation in R use the command options(scipen=alpha) where alpha is the maximum number of digits for the result to be still expressed in fixed notation.

$\endgroup$
  • 2
    $\begingroup$ Thanks. It appears that in response to my comment, the OP edited the question to add "in a covariance matrix"" to what is now "-1.861246e-04 for example in a covariance matrix" $\endgroup$ – Mark L. Stone Dec 20 '17 at 0:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.