0

I do have SPSS dataset, and need the P10,P25,Mean, Median, P75, P90 values by excluding the below P5 and above P95 values. Below image Column E is my Original Data and my Median value is $322.10

Calculated P5 & P95 in E1 and E2 cells. Now, have excluded the values with Lessthan P5 and above P95 numbers. After this math, I got my value is $398.11. So, I want to perform such calculations in SPSS. Please suggest. I usually run the numbers by using the below SPSS syntax. Now I want to add this condition in my existing syntax.

Q1.1 [MINIMUM, PTILE 5, PTILE 10, PTILE 25, MEAN, MEDIAN, PTILE 75, PTILE 90, PTILE 95, MAXIMUM, VALIDN F40.0]

enter image description here

1 Answers1

0

To identify the cases that belong to P95+ or P05- you can run:

rank vars=yourvar /ntiles(20).

This will create a new variable in which every case is marked with it's (5%)Ntile. (you can change the treatment of ties when dividing the cases to Ntiles - look up rank command for that). Now you can filter out the cases you don't want in the data and then run your analysis again:

select if not any(Nyourvar, 1, 20).
freq yourvar /format notable /ntiles=4 /ntiles=10 .

NOTE: using select will delete the unwanted cases completely. if you want to delete them only temporarily for one analysis you can use the command temp. just before running the above lines. If you want to remove them temporarily but for a few analyses look up the filter command to use instead of select.

eli-k
  • 10,898
  • 11
  • 40
  • 44