BAMSAUR | R Documentation |
This function can be used to estimate age-at-death with the choice of using Middenbeemster as a reference population or incorporating a sample from the R-evnironment.
BAMSAUR(
wear,
data = NULL,
rank = 2,
pop = "MB11",
interval = "prediction",
level = 0.68,
mars.int = F,
...
)
wear |
Numeric. The wear score of an individual. Can be a single value or a vector containing a list of wear scores from multiple individuals. |
data |
Data frame containing one column for ages-at-death and a second column for the average wear scores. Not required when pop = "MB11" is selected. |
rank |
Numeric. Indicates the rank of the polynomial regression. 1 = linear, 2 = quadratic, etc. Default is 2. |
pop |
Character. Indicates which reference population to use. "MB11" and "other" are supported. When "other" is selected, the data input is required. |
interval |
Character. The type of age interval used. Can be either "prediction" or "confidence" intervals. The default is set at "prediction". |
level |
Numeric. Determines the level of confidence or prediction intervals. Is a number between 0 and 1 (not inclusive). 0.68, 0.90, or 0.95 is recommended. The default is set at 0.68. |
mars.int |
Logical. Apply MARS-sized prediction intervals. |
... |
Can be used to pass additional arguments to the lm function. |
This function uses the "lm" function for the regression analyses.
a data frame containing the following values:
wear
The wear score(s) initially applied to the function
estimate
Age-at-death estimate(s) calculated from the wear score(s)
range
the age range (+- years) of the estimate, determined by the type and level.
lower
the lower bound of the age interval.
upper
the upper bound of the age interval.
#The following example calculates the ages-at-death with 90%PIs of 10 random wear scores
wear <- runif(10,0,16)
BAMSAUR(wear, interval = "prediction", level = 0.90)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.