![]() ![]() I have data that's tracking a certain eye phenomena. Some patients have it in both eyes, and some patients have it in a single eye. This is what some of the data looks like: EyeID PatientID STATUS GenderĪs you can see from the data above, there are 9 patients total and all of them have the particular phenomena in one eye. To count the number of patients with this eye phenomena, I used: PROC SORT data=new out=new1 nodupkey To get the number of total patients in the dataset, I used: PROC FREQ data=new nlevels I need the count the number of patients with this eye phenomena. However, it gave the correct number of patients with the phenomena (9), but not the correct number without (0). I now need to calculate the gender distribution of this phenomena. Sas 9.1 proc geodist how to#ĭoes anyone have any thoughts on how to do this chi-square, where if the has this phenomena in at least 1 eye, then they are positive for this phenomena? However, in the cross table, it has the correct number of patients who have the phenomena (9), but not the correct number without (0). ![]() PROC FREQ is doing what you told it to: counting the status=0 cases. In general here you are using sort of blunt tools to accomplish what you're trying to accomplish, when you probably should use a more precise tool. PROC SORT NODUPKEY is sort of overkill for example, and it doesn't really do what you want anyway. To set up a dataset of has/doesn't have, for example, let's do a few things. First I add one more row - someone who actually doesn't have - so we see that working. Patient_status = (patient_Status or status) If first.patientID then patient_status =0 We want a patient-level dataset at the end, where we have eye-level now. GEODIST() allows the user to specify 2 sets of longitude and latitude coordinates, and calculates the distance between the pairs. ZIPCITYDIST() calculates the number of miles between 2 US Zip Codes. title "Patients with/without condition in any eye" Also note you have a nice dataset of patients. In 9.2, SAS provides functions to calculate distance between longitude and latitude pairs with the addition of the ZIPCITYDIST() and GEODIST(). There are 8 other projects in the npm registry using geodist. Start using geodist in your project by running npm i geodist. You also may be able to do your chi-square analysis, though I'm not a statistician and won't dip my toe into whether this is an appropriate analysis. Latest version: 0.2.1, last published: 9 years ago. It's likely better than your first, anyway - as it correctly identifies has/doesn't have status in at least one eye. ![]()
0 Comments
Leave a Reply. |