3
$\begingroup$

I have a large data.frame in R. I would like to double if its distribution fit normal distribution or extreme value distribution better

Here is my simplified data.frame.

x <- data.frame(A=c(1,3,1,5,4,5,5,7,3,2,2,1,1,1,4,9,10))

Could you mind to let me know how to do so? Can I did this analysis with R?

$\endgroup$

2 Answers 2

3
$\begingroup$

Before considering formal tests, you should try plotting your data. For example,

R> #Plot shown below
R> hist(x$A)
#Backs up the plot
R> shapiro.test(x$A)

Shapiro-Wilk normality test

 data:  x$A 
 W = 0.873, p-value = 0.02452

It's clear from the histogram, that the data doesn't seem to be Normal. I find that it's helpful to get an idea of what's happening before moving onto formal tests.

enter image description here

Does your data fit an extreme valued distribution? That's a bit more tricky. What do you want to do with it?

$\endgroup$
1
$\begingroup$

A good test for normality is the Shapiro-Wilk test which is implemented in R as shapiro.test(x). For general distribution testing there is the Kolmogorov-Smirnov test which is also already implemented in R as ks.test. In addition there is a short introduction in the R manuals about examining data distributions

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.