LDAcrop.pro | R Documentation |
This function conducts linear discriminant analysis. The size, aerodynamics and tendency to remain in heads of weed seeds from ethnographic crop processing data are used to create a model against which the archaeobotanical samples are classified. The function provides the classification, posterior probabilities of such classifications, and the discriminant score of the entered samples.
LDAcrop.pro(x)
x |
The archaeobotanical dataset |
The archaeobotanical dataset needs to have been transformed and organised with columns labelled and in the order of: BHH, BFH, SHH, SHL, SFH, SFL. The first column of the dataframe should be the sample names. Transformation can be done manually following (insert reference) or through the use of crop.dataorg
which can transform a raw archaeobotanical dataset.
Results table:(note the * asterisked items appear in console output and are used for interpretation, non-asterisked columns provide addition details regarding standardised and unstandardised components
Samples |
the archaeobotanical sample names from the first column of the entered dataset (x) |
Class_std* |
The standardised classification of the samples as either 1,2,3,or 4. 1= winnowing by-product, 2= coarse sieve by-products, 3= fine sieve by-products and 4= fine sieve product |
Prob.1_std* |
the standardised posterior probability of the sample being classified as group 1 |
Prob.2_std* |
the standardised posterior probability of the sample being classified as group 2 |
Prob.3_std* |
the standardised posterior probability of the sample being classified as group 3 |
Prob.4_std* |
the standardised posterior probability of the sample being classified as group 4 |
ld1_std |
the standardised linear discriminant score for function 1 |
ld2_std |
the standardised linear discriminant score for function 2 |
ld3_std |
the standardised linear discriminant score for function 3 |
Class |
the unstandardised classification of the samples |
Prob.1 |
the unstandardised posterior probability of the sample being classified as group 1 |
Prob.2 |
the unstandardised posterior probability of the sample being classified as group 2 |
Prob.3 |
the unstandardised posterior probability of the sample being classified as group 3 |
Prob.4 |
the unstandardised posterior probability of the sample being classified as group 4 |
LD1* |
the unstandardised linear discriminant score for function 1 |
LD2* |
the unstandardised linear discriminant score for function 2 |
LD3* |
the unstandardised linear discriminant score for function 3 |
Classification table: showing the count and percentage of samples classified as one of four crop processing groups - as shown in the Class_std column
winnowing by-product |
the count and percentage of samples classified as group 1 |
Coarse sieve by-product |
the count and percentage of samples classified as group 2 |
Fine sieve by-product |
the count and percentage of samples classified as group 3 |
Fine sieve product |
the count and percentage of samples classified as group 4 |
Elizabeth Stroud
PAPER reference
##Create random dataset for examples
BHH<-runif(20, min=0, max=7)
BFH<-runif(20, min=0, max=24)
SHH<-runif(20, min=1, max=13)
SHL<-runif(20, min=0.5, max=17)
SFH<-runif(20, min=1, max=22)
SFL<-runif(20, min=1, max=8)
Samples<-c("s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13",
"s14","s15","s16","s17","s18","s19","s20")
data<-data.frame(Samples,BHH,BFH,SHH,SHL,SFH,SFL)
#Use
LDAcrop.pro(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.