Hello, I am working on a data set, where I was wondering if how can I have confidence ellipses around samples. If someone can help me,
#preparation of contigency table
#date: 03-22-2020
library(FactoMineR)
# reading data
df1 <- read.csv("C:/Users/che/Downloads/maieu_data_aroma.csv",stringsAsFactors = F)
contingency.table <- aggregate(df1[-c(1,2)], list(product=df1[, 2]), sum, na.rm=T)
library(prettyGraphs)
#> Warning: package 'prettyGraphs' was built under R version 3.5.2
library(ExPosition)
#> Warning: package 'ExPosition' was built under R version 3.5.2
ca.ex <- epCA(contingency.table[-1], graphs = F)
epGraphs(ca.ex)
#> **ExPosition plotting data**
#> *Contains the following objects:
#>
#> name description
#> 1 "$fi.col" "The colors for the row items."
#> 2 "$fi.pch" "The pch values for the row items."
#> 3 "$fj.col" "The colors for the column items."
#> 4 "$fj.pch" "The pch values for the column items."
#> 5 "$constraints" "Plotting constraints for axes."
install.packages("boot")
#> Installing package into 'C:/Users/chetan/Documents/R/win-library/3.5'
#> (as 'lib' is unspecified)
#>
#> There is a binary version available but the source version is
#> later:
#> binary source needs_compilation
#> boot 1.3-24 1.3-25 FALSE
#> installing the source package 'boot'
library(boot)
library(SensoMineR)
#>
#> Attaching package: 'SensoMineR'
#> The following object is masked from 'package:boot':
#>
#> boot
DistanceCube <- DistanceFromSort(contingency.table)
#> Error in DistanceFromSort(contingency.table): could not find function "DistanceFromSort"
boot(df1, method = "sorting", axes = 1:2, scale = TRUE, ncp = NULL, group = NULL,
nbsim = 200,level.conf = 0.95,nbchoix = NULL,color = NULL,cex = 0.8,
title = NULL, new.plot = TRUE)
#> Error in dimnames(res) <- list(attributes(tab)$row.names, listModa): length of 'dimnames' [2] not equal to array extent
Created on 2020-05-29 by the reprex package (v0.3.0)