cerardat_estim_nf {SPARTAAS}R Documentation

Number of axes to keep

Description

Estimate the correct number of axes to keep in the regression model.

Usage

cerardat_estim_nf(df, row.sup, date)

Arguments

df

The data (data.frame) is a contingency table with the observations in rows and the technical groups in columns.

row.sup

Index of supplementary rows in df (vector).

date

The dates of each observation or NA (vector).

Value

nf

Number of axes to keep (minimal PRESS value)

MSE

plot of the Mean Squared Error.

PRESS

plot of the PRediction Error Sum Of Squares.

Pvalue

plot of p-values from statistical tests on the hypotheses.

adj.R_sq

plot of the Coefficient of determination R².

data

data frame of MSE, PRESS and R_sq values.

data_stat

data frame of the p-values.

Author(s)

A. COULON

L. BELLANGER

P. HUSI

References

Bellanger L. and Husi P. (2012) Statistical tool for dating and interpreting archaeological contexts using pottery. Journal of Archaeological Science, Elsevier, 39 (4), pp.777-790. doi:10.1016/j.jas.2011.06.031.

Examples

library(SPARTAAS)
data(datacerardat)
res = cerardat_estim_nf(datacerardat$df, datacerardat$row.sup, datacerardat$date)

#Number of axes to keep (minimal PRESS value)
res$nf

#the plots
res$MSE
res$PRESS
res$adj.R_sq

[Package SPARTAAS version 1.2.4 Index]