FID         IID       PEDSEX       SNPSEX       STATUS            F
  aaa100000   aaa100000            2            0      PROBLEM          nan
  bbb100000   bbb100000            2            0      PROBLEM       0.4208
I got the above results by doing sex check as
plink --noweb --bfile mydat --check-sex --out mydat
I wonder what nan means in the output. Seems like it is because inbreeding coefficient F cannot be computed but why is that? Thanks for your help.
nan or NaN or NA in computing generally refer to something that is "Not A Number". When running statistical tests, NaN can be returned when the statistics cannot be computed, perhaps due to missing values in the data or inappropriately coded data.
Check the X chromosome genotype calls for that individual. Missing data often hoses things.
Thanks for the hint. Yes, those with nan F values had completely missing genotypes on the X chromosome.