Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Digits after comma in output

    Hey there,

    I was wondering if someone could help me change the number of digits after the comma in the output (currently it's 0,001).

    I need this because after becoming the determinant of the correlation matrix, it appeared to be 0.000. Now I need to know of this value is smaller or bigger than 0.00001, to know if the items I put together face the problem of singularity.

    Thanks in advance,

    Caro

  • #2
    It's not entirely clear where this determinant of the matrix is coming from. Assuming you have some Stata matrix M and you are using Stata's det() function, if you need five decimal places you can write:

    Code:
    display %07.5f =det(M)
    If the determinant is, instead, the output of some rclass or eclass program whose default output contains only 3 decimal places, you need to see where in r() or e() the determinant is returned, and then you can -display %07.5f =- that.

    By the way, if the matrix you are taking the determinant of is e(V) from a regression model in which you have used factor variables as predictors, be careful: the matrix will include a row and column of zeroes corresponding to the omitted base-values of each factor variable. So the determinant will always be zero. If this is your situation, you will have to take a submatrix that omits those first.

    Hope this helps.

    Comment

    Working...
    X