Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / SPSS / February 2010



Tip: Looking for answers? Try searching our database.

Grouping by date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Webby - 19 Feb 2010 19:39 GMT
Hi,

Im new to SPSS so if anyone can point me in the right direction I'd be
very grateful. I have a data set that is arranged as:

Date Result
11.01.99    20
11.01.99    21
11.01.99    19
12.01.99     5
12.01.99     6
12.01.99    5
etc

What I would like to do is group the data by date and then calculated
descriptive statistics for each day: i.e is there an easy way to do
this automatically? I have my data stored in a database so could issue
multiple queries on the DB for each day .

cheers
Craig
Art Kendall - 19 Feb 2010 20:19 GMT
Open a new instance of SPSS. Copy and paste the syntax below into a
syntax window the run it.
if this is not what you are asking please give more detail.

data list list /myDate(adate8) Result(f2).
begin data
11.01.99    20
11.01.99    21
11.01.99    19
12.01.99     5
12.01.99     6
12.01.99    5
end data.
means VARIABLES=result by myDate /cells=all.
frequencies vars = mydate.

Art Kendall
Social Research Consultants

> Date Result
> 11.01.99    20
[quoted text clipped - 3 lines]
> 12.01.99     6
> 12.01.99    5
WimN - 23 Feb 2010 18:33 GMT
> Open a new instance of SPSS. Copy and paste the syntax below into a
> syntax window the run it.
[quoted text clipped - 22 lines]
> > 12.01.99     6
> > 12.01.99    5

You don't need syntax for that. Just choose "split file..." from the
"Data" menu, choose either "Compare groups" or "Organize output by
groups" and define the "Date" variable as the one to base the groups
on.
From that point onward all stats will be calculated separately for
each date, until you lift the "split file...".
Good luck
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.