A maximum likelihood statistical method for analyzing frequency-dependent fitness experiments