TFQA Logo

Tools for Quantitative Archaeology
   Email:
             Kintigh email

TFQA Home
TFQA Documentation
TFQA Orders
Kintigh's ASU Home


ROOMACCUM: Demographic Simulation

 

This program is designed to estimate within-period rates of population growth (or decline) for a sequence of chronological periods based on a knowledge of the number of structures that date to a specific period, the period lengths, and an estimated stucture use life. The population growth rate estimates are derived by simulating the construction (due to replacment and population growth) and abandonment (due to the end of use life or population decline) of individual structures such that the observed number of rooms dating to a period matches the simulated number of rooms. The program also calcuates the between-period growth rates calculated according to the standard formula. The simulated results may be quite different because the simulation more closely mimics an actual process. A discussion based on an earlier version of the program is provided in Kintigh et al. 2004 (see bibliography). To run the program you will first want to read Program Conventions and Running TFQA under Windows. The program executable, source code, and sample input and output are available for download at roomaccum.zip.

 

SEQUENCE OF PROGRAM PROMPTS


Structure Use Life {25} ? 25

Reply with the expected structure use life.

 

File with Period Data (Reply CON for Keyboard Entry) {.TXT} ? Roomtext.txt

File Must Have: nPeriod, Start[1], End[1], Rooms[1], End[2] Rooms[2]...

 

Reply CON to enter the period data interactively or give a text file name with the period information. The period information can be entered interactively, but you will probably want to run the program more than once with a single set of data, so creating an input file will likely save you some time. It can be created with Notepad or any program that will output a plain text file. The file is free format. The program is simply looking for a set of numbers separated by blanks (or commas or tabs) that describe the periods. The input can be on a single line or broken up in any way. It assumes the first number read is the number of periods and the second is the start date of the inital period. Then for each period there is a pair of numbers which represent the end date of the period and the number of rooms dated to that period. In the example file below, there are 6 periods beginning in AD 900. There are 38 rooms dating to the 900-950, 105 dating to 950-1050, etc.

 

Randomize Use Lives of Houses {Y} ?

Standard Deviation of House Use Life {2.5} ?
Use Lives are Normally Distributed Around Structure Life
+/- Standard Deviation (min=1, max=2*Structure Life

Random Generator Seed (0 to set from clock) {0} ?
Random Seed: -374208475

 

Rather than have each structure last precisely the use-life number of years, the program offers a suggested option to somewhat randomize the use-life. A reply of N will produce exact use-lives. A defaul reply of Y will result in randomized use lives and the subsequent prompts. Randomized use-lives are normally distributed with a mean of the nominal structure use-life and a standard deviation specified by the user (default is 2.5 years) with the constraint that the minimum use life is 1 year and the maximum use-life is twice the nominal structure ue life. If the standard devation is considerably smaller than the use life, the constraints should not come into play. The default random number generator seed can normally be used. However a run can be exactly replicated if the same seed is supplied. The program reports the seed used.

 

[I]terate Growth Rate or [U]ser Control {I} ?

 

By default the program will iteratively find the growth rate that precisely matches the input data. However, under User control (reply U) it will promt for a growth rate and then run the simulation under user control, allowing multiple runs for a single period, of which only the final run for the period is saved.

 

Initial Number of Rooms {0} ?

 

The program does not have enough information to estimate the total number of rooms at the beginning of the very first period. (For subsequent periods the number of starting rooms is simply the terminal number of rooms for the previous period.) The user can specify any number here. What we suggest in the absence of other data is to run the simulation multiple times with different numbers of initial rooms until the growth rates for the first two periods are as close together as possible. If you experiment a bit I think you will see how that works. For the test data set provided below, 17 starting rooms results in the most similar possible growth rates for the first two periods.

Structure Life: 25 +/-  2.5
Period Start End Start Ending Dated Target Growth
Period Date Date Rooms Rooms Rooms Rooms Rate %
1 900 950 17 21 38 38 0.43 ( 0.400 - 0.440)
2 950 1050 21 32 105 105 0.41 ( 0.410 - 0.420)
3 1050 1125 32 33 97 97 0.03 ( 0.020 - 0.040)
4 1125 1175 33 114 129 129 2.53 ( 2.520 - 2.540)
5 1175 1225 114 220 323 323 1.33 ( 1.326 - 1.330)
6 1225 1275 220 165 468 468 -0.58 ( -0.584 - -0.580)
Note: The min and max growth rates may not represent the full range
Period Start   End Implied Growth
1 - 2 925 1000 0.432
2 - 3 1000 1088 0.238
3 - 4 1088 1150 1.111
4 - 5 1150 1200 1.853
5 - 6 1200 1250 0.744

The program shows the results of each period's simulation as it goes along (so you can see something is happening) and then does a reprise on the screen when it is done, as shown above. It first provides its demographic reconstruction. Often the key number is the Growth Rate % for each period. To the right is shown the range of growth rates that provide the same result for that period. (Because the number of rooms is an integer, a range of rates will give the same result. However, the program only reports the range of rates that it encountered that produce the same results, somehat more deviant rates may also give the same result--this could be determined using User control rather than an Iterated solution. It is probably unwise in any case to take these estimates as highly precise.) The number of starting and ending rooms for each period is also provided along with the observed number of rooms (structures) dated to that period (the Target Rooms) and the simulated number of structures dated to the period (Dated Rooms) that should be the same. Note that rooms whose occupations span period boundaries are counted in the period with the majority of the occupation. Thus the dated rooms would be all structures whose occupations are fully within the period plus some of the starting rooms and some of the ending rooms. (All of the starting rooms of the initial period will date to that period and all of the ending rooms in the terminal period will date to their respective periods.) Finally the program uses the standard formula to calculate the implied between-period growth rates. These amount to average growth rates from the midpoint of one period to the midpoint of the next with structure counts standardized to period length.

 

Run Again {N} ? N

 

This prompt allows you to repeat the analysis with the same input data.

 

Print to File {Y} ? Y

Output File Name {.txt} ? RoomTestOut.txt
Print Annual Record {N} ? Y
Program End

 

These prompts ask if you want to save a file with the results. If so, you supply a file name. If you ask for an output file you can optionally get a year by year count of the number of occupied rooms. This file is saved as a plain text file.

 

OK to Close Program Window {Y} ?

Press Enter or Y to end the program.

 

SAMPLE PROGRAM INPUT

6 900 
  950  38
 1050 105
 1125  97
 1175 129
 1225 323
 1275 468

 

SAMPLE PROGRAM OUTPUT

Structure Life: 25 +/-  2.5
Period Start End Start Ending Dated Target Growth
Period Date Date Rooms Rooms Rooms Rooms Rate %
1 900 950 17 21 38 38 0.43 ( 0.400 - 0.440)
2 950 1050 21 32 105 105 0.41 ( 0.410 - 0.420)
3 1050 1125 32 33 97 97 0.03 ( 0.020 - 0.040)
4 1125 1175 33 114 129 129 2.53 ( 2.520 - 2.540)
5 1175 1225 114 220 323 323 1.33 ( 1.326 - 1.330)
6 1225 1275 220 165 468 468 -0.58 ( -0.584 - -0.580)
Note: The min and max growth rates may not represent the full range
Period Start   End Implied Growth
1 - 2 925 1000 0.432
2 - 3 1000 1088 0.238
3 - 4 1088 1150 1.111
4 - 5 1150 1200 1.853
5 - 6 1200 1250 0.744 Year Occupied
900 0
901 17
902 17
903 17
904 17
... 1275 165

Home Top Overview Ordering Documentation

Page Last Updated - 22-Jul-2007