Resources

How can I delete all observations containing a missing value?

0

I have a matrix of observations and I would like to, in some cases, remove all of the rows in which there is a missing value for any of the variables. What is the easiest way to do this in GAUSS?

asked September 3, 2012
admin
27

1 Answer

0

GAUSS has a function named ‘packr’ for exactly this purpose. The procedure name is short for “pack rows”. If you have a matrix ‘A’ with missing values:

   newA = packr(A);

‘newA’ will be a copy of the original matrix ‘A’, but with all rows that contained a missing value removed.

admin
27