[R] Handling NA's when you write your own code

Olu Ola oluola2011 at yahoo.com
Wed Sep 9 21:03:19 CEST 2015

I have a dataset that have a couple of missing values and I DO NOT want to delete the observations with the missing values. I have read about na.action in dealing with missing values but I do not know how it applies to user-specific written code.

Is there a code you can use with your dataset so that subsequent analysis will automatically detect missing values?

The following are some of the things I will be doing so that you can advice me appropriately

Computing OLS estimates using the matrix approach
Write objective and gradient function subroutines which will now be used in the Optimx for nonlinear optimization.

Thank you

More information about the R-help mailing list