Hello,

I apologize in advance for any beginner's mistakes, as this is my first post. I'm working with panel data of five variables: Year, SenateHouse, State, GeneralElectionStatus, and IncumbentChallengerStatus. Each observation is an individual political campaign. SenateHouse is a dummy variable for whether the campaign is for the Senate or the House of Representatives, State is the American state of the campaign (encoded), GeneralElectionStatus is a dummy for if the campaign was victorious or not, and IncumbentChallengerStatus is a dummy for if the campaign was that of an incumbent or a challenger. My goal is to find the percentage of political campaigns within each year, state, and chamber of congress that were those of incumbents. An incumbent ratio of sorts. I've been looking into using the "contract" command, but hadn't been able to figure out how to get the percentage value within the categories of the other variables. Any assistance that you may be able to provide is much appreciated.