The IBES "PDF" variable (primary / diluted flag) in the IBES Detail History file indicates the way in which each analyst's estimate is received by IBES ("Estimate Level"). It does not necessarily indicate the way in which the estimate is recorded in the database, however.
For any given company, IBES will report all analyst estimates on a primary or a diluted basis, but not both - the consensus method of the analysts determines the reporting method. For those analysts whose estimates do not conform to the consensus, their estimates are converted to the prevailing method. For example, if all analysts but one report their estimates on a diluted basis, and one chooses to report on a primary basis, the single outlier will be converted to a diluted basis. In this case, all analysts but one will have a value of "D" for the PDF variable, while the outlier analyst will have a value of "P". All of these estimates will be reported on a diluted basis, however.
The PDI variable in the Identifier File (a Detail History ancillary file - id.sas7bdat) indicates whether the company is followed on a primary or diluted basis by IBES. In the above example, the value of PDI would be "D". If the value of PDF does not equal the value of PDI (within the Detail History files), it means the estimate values have been converted. In such cases, the estimates can be converted back to their original form using the DILFAC (Dilution Factor) variable of the Detail History Identifier file. ( [Estimate, Primary] = [Estimate, Diluted] * DILFAC )
The PDI variable in the "Company Identification" file (part of the Summary History files - idsum .sas7bdat) identifies whether the company reports on a primary or diluted basis. This information is obtained from the company's annual reports.