Dear List Members
I have incidents data for 5 years as follows: Sample Dummy Data Year DV Incidents 2006 124603 2007 130088 2008 125760 2009 126323 2010 126336 How do I calculate the average annual percentage change? Would be grateful if anyone could help me. thanks regards thara
|
try this code:
compute pchange = ((dvincidents - lag(dvincidents)) / lag(dvincidents)) * 100. Maurice On Wed, Aug 10, 2011 at 4:01 AM, Thara Vardhan <[hidden email]> wrote: Dear List Members -- ___________________________________________________________________ Maurice Vergeer Department of communication, Radboud University (www.ru.nl) PO Box 9104, NL-6500 HE Nijmegen, The Netherlands Visiting Professor Yeungnam University, Gyeongsan, South Korea Recent publications: -Vergeer, M., Eisinga, R. & Franses, Ph.H. (forthcoming). Supply and demand effects in television viewing. A time series analysis. Communications - The European Journal of Communication Research. -Vergeer, M. Lim, Y.S. Park, H.W. (forthcoming). Mediated Relations: New Methods to study Online Social Capital. Asian Journal of Communication. -Vergeer, M., Hermans, L., & Sams, S. (forthcoming). Online social networks and micro-blogging in political campaigning: The exploration of a new campaign tool and a new campaign style. Party Politics. -Pleijter, A., Hermans, L. & Vergeer, M. (forthcoming). Journalists and journalism in the Netherlands. In D. Weaver & L. Willnat, The Global Journalist in the 21st Century. London: Routledge. Webspace www.mauricevergeer.nl http://blog.mauricevergeer.nl/ www.journalisteninhetdigitaletijdperk.nl maurice.vergeer (skype) ___________________________________________________________________ |
Administrator
|
Or the following which only requires doing the lag once.
IF ($CASENUM GT 1) pctchange=( dvincidents / lag(dvincidents) - 1 )*100. HTH, David --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by thara vardhan-2
Although in this instance the average change and
annual growth rate for the whole length of the dataset are close,
they can be different.
new file. data list list/Year (f4) dvincidents(f6). begin data 2006 124603 2007 130088 2008 125760 2009 126323 2010 126336 end data. dataset name input. compute pctchange1=( dvincidents / lag(dvincidents) - 1 )*100. formats pctchange1 (pct9.2). var labels pctchange1 'year to year pct change'. list. compute nobreak = 1. dataset declare aggfile. aggregate outfile=aggfile /break = nobreak /entries = n /start = first(dvincidents) /end = last (dvincidents). dataset activate aggfile. compute periods= entries-1. compute grosschange= ( (end /start)-1) * 100. compute avgchange = grosschange/periods. compute growthrate =((end/start) **(1/periods))-1. compute annualgrowthpct = 100*growthrate. formats grosschange avgchange annualgrowthpct (pct7.2) growthrate (f8.5). compute check = start*((1+growthrate)**periods). formats check (f6). list. Art Kendall Social Research Consultants On 8/9/2011 10:01 PM, Thara Vardhan wrote: Dear List Members===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants |
Hi, It is possible to select random sample of cases for different groups? I have an “age” variable and I would like to use it to select random sample for each of the following age bands: 1-16-24 2-25-34 3-35-44 4-45-54 5-55-64 6-65+ Thanks in advance!!! Joan Casellas Vega Media Research Analyst Phone: +44 20 7593 1585 |
Free forum by Nabble | Edit this page |