def to_dict(self):
        """
        Returns a dictionary representation of the dataset.
        """
        d = dict(doses=self.doses, ns=self.ns, incidences=self.incidences)
        d.update(self.kwargs)
        return d
Returns a dictionary representation of the dataset.