I've been trying to get a minimum out of one variable, but when I use the compute MIN(?, ?) command, I get back the minimum for each seperate case on that variable in a new variable. So basically it's just the same variable as before because each case is the same. If I put in an additional variable to match the requested argument in the formula I get back the minimum for that variable on each individual case (as the added variable is lower on each case than the variable I am trying to get the minimum out of.) Does anyone have some recommendations? I am using SPSS 20

0 |

9/14/2016 2:32:36 PM

By the way: I am trying to get a minimum out of 1 variable because I have 208 dates per original case and I am trying to match the date closest to the case. I have deducted the dates from eachother (and squared them to remove the negatives), so now I have 208 indexed cases per original case. Put simply I have a dataset like this one, but with additional variables stating the deduction and would like to go towards a dataset with 1 date per case (the closest, thus the deduction and the minimum) Case Date 1 1 1 2 1 3 2 1 2 2 2 3

0 |

9/14/2016 2:53:30 PM

On 14/09/2016 10:32 AM, Bram V wrote: > I've been trying to get a minimum out of one variable, but when I use the > > compute MIN(?, ?) command, I get back the minimum for each seperate case on that variable in a new variable. > > So basically it's just the same variable as before because each case is the same. > > If I put in an additional variable to match the requested argument in the formula I get back the minimum for that variable on each individual case (as the added variable is lower on each case than the variable I am trying to get the minimum out of.) > > Does anyone have some recommendations? > > I am using SPSS 20 > Have you tried the AGGREGATE command? http://www.ibm.com/support/knowledgecenter/SSLVMB_20.0.0/com.ibm.spss.statistics.help/syn_aggregate_functions.htm -- Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/Home "When all else fails, RTFM."

0 |

9/14/2016 11:05:05 PM

Ah, that was indeed what I was looking for. Thank you very much!

0 |

9/15/2016 12:58:23 PM