plotHistogramOverlayCorrelation {Irescale} | R Documentation |
plotHistogramOverlayCorrelation
Overlays the histogram and the theorical normal distribution.
plotHistogramOverlayCorrelation(originalVec, vec, I, n, bins = 50,
main = "Histogram")
originalVec |
The original vector of I, it should be sorted. |
vec |
the vector to plot. |
I |
the value of I to plot |
n |
number of observations in the sample. |
bins |
the number of bins for the histogram, The default value is 30. |
main |
the title of the histogram, The default value is "Histogram". |
inputFileName<-system.file("testdata", "chen.csv", package="Irescale")
input<-loadFile(inputFileName)
distM<-calculateEuclideanDistance(input$data)
I<-calculateMoranI(distM = distM,varOfInterest = input$varOfInterest)
originalI<-resamplingI(distM, input$varOfInterest)
correlationI<-ItoPearsonCorrelation(originalI,length(input$varOfInterest))
plotHistogramOverlayCorrelation(originalI,correlationI,I,length(input$varOfInterest))