Dear Dr. Todd, I found your video on selecting cases very useful, however I have another question concerning selecting cases. I have a dataset with cases with multiple measurements and I would like to select only the cases who score negative on the first measurement. The problem is that some cases also score negative on the next measurements. It is not possible to select a timeframe, because the cases in the dataset are measured at different time points, so also their follow-up measurements differ (they don't have the same start date or end date). For example, one case had his first measurement in January 2017 and the second measurement in February 2017, while the second case had his first measurement in February 2017 and the second measurement in May2017. Some cases score all measurements negative, while others score positive on the second or upcoming measurements. Do you know how I can filter/select only the cases who score negative on the first measurement? I am looking forward to hearing from you. Many thanks in advance. Yours sincerely, Lidy van Lente
Hello, How would you do this if you just wanted to select a liklihood range, for example I want to use cases who scored themselves on a liklihood between 1 and 100 to enter further education, the interest variable itself includes youth and adults, so is labeled with 'inapplicable' coded as - 9 and the scores are on a range of 1 to 100, missing is coded as 269. I want to select the range 1 to 100 but obviously would not put date or time. what would I put instead? when I just put the numbers I get an error message. Also I am using select cases within the compute variable if that makes any difference. Leanne
Dear Dr. Todd, thank you for explaining. I tried to do the function; however this error appears: "The arguments to the ANY and RANGE functions must be either all strings (or string expressions) or all numeric variables (or numeric expressions).". Do you know how to fix this problem? My command is "RANGE(datumOK, date.dmy(1,1,2014), date.dmy(31,12,2018))." (I want to select the cases between 1st of january until end of 2018.
I had the same issue. SPSS doesn't seem to accept the format dmy. My dates are year-month-day but I still managed to select cases when I used the dmy in the command.
i am trying with "RANGE(time,time.hms(8,0,0))" for specific time 8:00:00 am but it shows " Incorrect number of arguments to the RANGE or ANY functions. RANGE requires an odd number larger than two, and ANY requires at least two. Check for a comma used as a decimal delimiter. Commas cannot be used as decimal delimiters in transformations."
+Paloma Satierf Certainly, here are the two functions: RANGE(Pretest_Date, date.mdy(4,15,15), date.mdy(6,5,15)) RANGE(Pretest_Time, time.hms(12,0,0), time.hms(16,0,0))
Thank you for the helpful video. I was having trouble selecting based on date range, and now I know how.
Thank you, it was a great help
Dear Dr. Todd, I found your video on selecting cases very useful, however I have another question concerning selecting cases. I have a dataset with cases with multiple measurements and I would like to select only the cases who score negative on the first measurement. The problem is that some cases also score negative on the next measurements. It is not possible to select a timeframe, because the cases in the dataset are measured at different time points, so also their follow-up measurements differ (they don't have the same start date or end date). For example, one case had his first measurement in January 2017 and the second measurement in February 2017, while the second case had his first measurement in February 2017 and the second measurement in May2017. Some cases score all measurements negative, while others score positive on the second or upcoming measurements. Do you know how I can filter/select only the cases who score negative on the first measurement? I am looking forward to hearing from you.
Many thanks in advance.
Yours sincerely,
Lidy van Lente
thank you very much, Dr Grande
Excellent, thank you, this is so useful.
Hello,
How would you do this if you just wanted to select a liklihood range, for example I want to use cases who scored themselves on a liklihood between 1 and 100 to enter further education, the interest variable itself includes youth and adults, so is labeled with 'inapplicable' coded as - 9 and the scores are on a range of 1 to 100, missing is coded as 269. I want to select the range 1 to 100 but obviously would not put date or time. what would I put instead? when I just put the numbers I get an error message.
Also I am using select cases within the compute variable if that makes any difference.
Leanne
Dear Dr. Todd, thank you for explaining. I tried to do the function; however this error appears: "The arguments to the ANY and RANGE functions must be either all strings (or string expressions) or all numeric variables (or numeric expressions).". Do you know how to fix this problem? My command is "RANGE(datumOK, date.dmy(1,1,2014), date.dmy(31,12,2018))." (I want to select the cases between 1st of january until end of 2018.
I had the same issue. SPSS doesn't seem to accept the format dmy. My dates are year-month-day but I still managed to select cases when I used the dmy in the command.
Thank you. Very useful
Thank you, you save my day
Thank you for the help
i am trying with "RANGE(time,time.hms(8,0,0))" for specific time 8:00:00 am but it shows " Incorrect number of arguments to the RANGE or ANY functions. RANGE requires an odd number larger than two, and ANY requires at least two. Check for a comma used as a decimal delimiter. Commas cannot be used as decimal delimiters in transformations."
Thank you!!!
Hello, how are you? I tried to do this, but I can't properly see the command, could put you here for me , please?
+Paloma Satierf Certainly, here are the two functions:
RANGE(Pretest_Date, date.mdy(4,15,15), date.mdy(6,5,15))
RANGE(Pretest_Time, time.hms(12,0,0), time.hms(16,0,0))
Thank you!