Good morning from Canada!
I am trying to compute the following ratio: Number of visits to a given patient's "usual provider of care" (i.e., the general practitioner [GP] most frequently visited by the patient in a given time period) : Total number of GP visits (to any GP) by the same patient over the same time period
My raw dataset shows GP visits nested within patient; that is, I have one row of data for each GP visit and multiple rows of data for patients with more than one GP visit. For each, visit I have a Provider ID variable, which is the unique identifier assigned to each registered healthcare provider in the province.
I was able to obtain the denominator (total # of GP visits) by restructuring my dataset (Data->Restructure...->Restructure selected cases into variables) so that the family doctor visits became variables within each patient (resulting in one row of data per patient with family doctor visits becoming a repeated measures variable) and selecting the 'Count the number of cases in the current data used to create a new case'.
However, I am unsure about how to proceed to compute the numerator (# of visits to usual GP). The first step would be to identify the most frequently-occurring unique Provider ID (nominal, numeric 9-digit variable) across GP visits; once I've identified the most frequently-occurring Provider ID for each patient, it would just be a matter of counting the frequency of occurrence of that given Provider ID to obtain the numerator.
My question: How do I identify the most frequently-occurring value across repeated measurements of the Provider ID variable? Please provide an example using syntax. Note that, for whatever reason, the Python SPSS extension was not installed on my computer (to which I have no administrator privileges).
Thank you for your help and advice,