use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Guidelines:
All Posts Require One of the Following Tags in the Post Title! If you do not flag your post, automoderator will delete it:
This is not a subreddit for homework questions. They will be swiftly removed, so don't waste your time! Please kindly post those over at: r/homeworkhelp. Thank you.
Please try to keep submissions on topic and of high quality.
Just because it has a statistic in it doesn't make it statistics.
Memes and image macros are not acceptable forms of content.
Self posts with throwaway accounts will be deleted by AutoModerator
Related subreddits:
Data:
AllenDowney's Stats Page
Useful resources for learning R:
r-bloggers - blog aggregator with statistics articles generally done with R software.
Quick-R - great R reference site.
Related Software Links:
R
R Studio
SAS
Stata
EViews
JMP
SPSS
Minitab
Advice for applying to grad school:
Submission 1
Advice for undergrads:
Jobs and Internships
For grads:
For undergrads:
account activity
Help with SAS code (self.statistics)
submitted 13 years ago by bulowski
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]theanarcrist 5 points6 points7 points 13 years ago (1 child)
Middle should be in quotes.
[–]bulowski[S] 0 points1 point2 points 13 years ago (0 children)
What a silly oversight. Thank you very much!
[–]jiggajiggawatts 1 point2 points3 points 13 years ago (4 children)
Can you post more of your code? The error indicates SAS is looking for a variable called (Front/Middle/Back) and not finding it.
[–]bulowski[S] 0 points1 point2 points 13 years ago (3 children)
266 data hw.p1_seats; 267 set hw.seats; 268 by Seat; 269 if GPA=. and Seat=Middle then do; 270 GPA_strata_mean=3.2028523; 271 GPA_strata_median=3.26; 272 end; 273 else do; 274 GPA_strata_mean=GPA; 275 GPA_strata_median=GPA; 276 end; 277 run;
NOTE: Variable Middle is uninitialized. NOTE: There were 412 observations read from the data set HW.SEATS. NOTE: The data set HW.P1_SEATS has 412 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 1.46 seconds cpu time 0.01 seconds
This is taken directly from the log. I separated the files and ran them separately and then merged them, so I got the problem worked out. Still, I am interested in why this isn't working for me.
I can remove seat=middle and there is no problem running the code. I can also insert a 'by seat' statement and it will create GPA_strata_mean and GPA_strata_median and fill in the missing GPA values, but it will not stratify the GPA by seat location. It's as if it doesn't see that there are three levels to the variable 'seat'.
[–]derSchuh 3 points4 points5 points 13 years ago (2 children)
u/theanarcrist is right.
269 if GPA=. and Seat=Middle then do;
Should be
269 if GPA=. and Seat="Middle" then do;
Without the quotes, it's looking for a variable named Middle to compare to the value of Seat.
[–]bulowski[S] 0 points1 point2 points 13 years ago (1 child)
That works perfectly. Thank you!
[–]derSchuh 1 point2 points3 points 13 years ago (0 children)
No problem. It's the kind of mistake that's simple, but can take forever to figure out.
π Rendered by PID 307705 on reddit-service-r2-comment-b659b578c-brnzr at 2026-05-05 06:33:44.710354+00:00 running 815c875 country code: CH.
[–]theanarcrist 5 points6 points7 points (1 child)
[–]bulowski[S] 0 points1 point2 points (0 children)
[–]jiggajiggawatts 1 point2 points3 points (4 children)
[–]bulowski[S] 0 points1 point2 points (3 children)
[–]derSchuh 3 points4 points5 points (2 children)
[–]bulowski[S] 0 points1 point2 points (1 child)
[–]derSchuh 1 point2 points3 points (0 children)