Question Regarding Filtering

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

jdorman135
Posts: 3
Joined: Mon Mar 03, 2014 6:48 pm

Question Regarding Filtering

Postby jdorman135 » Mon Mar 03, 2014 7:05 pm

I was wondering if you all could perhaps verify the validity of some syntax I'm trying to use for a regression. To give you some context, I'm making an effort to explore how two separate groups of students are performing year-to-year on a test. I am trying to filter the students based on several variables so that I am parceling out the groups of interest. However, when I run the regression, I am not getting the Ns I was expecting. In reviewing the original dataset, filtering out all cases that missing values for all included variables, I find that there should be more cases included in the outputs produced in SPSS. I am wondering if my syntax are not properly written, and are perhaps filtering out cases unnecessarily. The "ConsecutiveAttendance" variables are to specify that I want students who have attended either 1 year of program, or none at all. The other filters are for a particular district and to exclude High Schools. Sorry if this is a basic/dumb question, but I appreciate any help you guys could offer.


USE ALL.
COMPUTE filter_$=((ConsecutiveAttendance1213 = 1 or ConsecutiveAttendance1213 = 0) AND (SchoolType <> "HS") AND (SchoolDistrict1213= "Santa Ana USD")).
VARIABLE LABELS filter_$ '(ConsecutiveAttendance1213 = 1 or ConsecutiveAttendance1213 = 0) AND (SchoolType <> "HS") AND (SchoolDistrict1213= "Santa Ana USD")(FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT CST_ELA_SCORE_1213
/METHOD=ENTER ELStatus Gender FRL StudentEthnicity CST_ELA_SCORE_1112 THINKAtt150_1213.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Question Regarding Filtering

Postby GerineL » Tue Mar 04, 2014 9:01 am

you probably made a mistake here:

COMPUTE filter_$=((ConsecutiveAttendance1213 = 1 or ConsecutiveAttendance1213 = 0) AND (SchoolType <> "HS") AND (SchoolDistrict1213= "Santa Ana USD")).


for instance, possibly "Santa Ana USD" is sometimes written as " Santa Anna USD".
without seeing your data and knowing what you want to select, it is impossible to say where the mistake is exactly.


Just in case, it says here you want to select cases:
- That have consecutiveattendance 1 or 0, and are not in schooltype HS, and are in school district santa ana.

That right?
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Question Regarding Filtering

Postby GerineL » Tue Mar 04, 2014 9:04 am

also, just to be sure:

When you look in the original data file, do the right cases get filtered out, or too many cases?
If the right cases are filtered out, but in your analyses the N is too low, it may be because there are missings on some of the variables you run your analyses on, as regression is run using missing is listwise procedure
jdorman135
Posts: 3
Joined: Mon Mar 03, 2014 6:48 pm

Re: Question Regarding Filtering

Postby jdorman135 » Tue Mar 04, 2014 9:34 pm

"Just in case, it says here you want to select cases:
- That have consecutiveattendance 1 or 0, and are not in schooltype HS, and are in school district santa ana."

Yes, that is exactly the data set that I'm looking for. Is the syntax correctly written for that, or am I perhaps missing parentheses around certain operands?


"for instance, possibly "Santa Ana USD" is sometimes written as " Santa Anna USD".
without seeing your data and knowing what you want to select, it is impossible to say where the mistake is exactly. "

I've checked to see that the spelling is consistent in the file for the string variables. As for the numeric variables, they are all consistent with values of either 1,0, or "". To check the ns in excel, i filtered by each of the fields included in the analyses (not including any blanks, because, like you mentioned, it is listwise and will exclude blanks) and ended up with an n value higher than the ns being produced in SPSS. I unfortunately can not share the original raw data file with you, due to confidentiality agreements with the districts we serve. Any other ideas that I can try? Thank you for your time.
jdorman135
Posts: 3
Joined: Mon Mar 03, 2014 6:48 pm

Re: Question Regarding Filtering

Postby jdorman135 » Tue Mar 04, 2014 10:08 pm

I got it. Sorry about that, I was forgetting to filter the last variable because I assumed it was all 1s and 0s, but i forgot that I had recoded it so there were several blanks. Thanks for your help.

Who is online

Users browsing this forum: No registered users and 1 guest

cron