Hi there,

I'm new to Stata and attempting to drop some observations from my sample, however I keep encountering the r109 type mismatch error. I would highly appreciate any help that any of you kind users may be able to offer.

The variable I'm working with reflects the percentage of shares acquired through an M&A deal, and these are displayed as numbers to four decimal places, but the type and format described by Stata are str9 and %9s respectively.

I wish to drop all observations less than 51%, so following the instructions here I use the following code:

Code:
drop if me_shares_acq_pct < 51
However I keep encountering the r109 error. I understand this may be due to how the variable values are formatted, but I'm unsure of how to format them correctly so that this process may go ahead unimpeded.

Please let me know if you require any further information regarding the issue.