Normality test in R
1
0
Entering edit mode
5.8 years ago

I want to test normality in R, my data looks like:

file:///home/ravi/Pictures/data.png

I want to do normality test for each of the transcript. I used the code as:

my_data <- read.csv("b.csv")
my_data
shapiro.test(my_data$t1)

When I am doing shapiro.test(my_data) Error: is.numeric(x) is not TRUE It gave me result for t1, likewise I want to do for all, how to do it at once?

Normalization • 5.7k views
ADD COMMENT
0
Entering edit mode

Data is like this, where each row represents patient's ids (p1,p2,p3,p4,p5,p6) and each column represents transcript ids (t1,t2,t3,t4)

patient_ids t1                    t2                                 t3                     t4

p1  -0.3348084704   -0.2732068627   -0.7152915678   -14.6515904534

p2  -1  0.3220577055    -0.3031125014   -195.4591868222

p3  -100.4900687014 0.5422026753    -244.7736997568 0.3755005677

p4  -101.9815047041 -0.4288370173   -0.2881487096   -1.158309705

p5  -0.7065238341   -0.2664395277   -1  0.0449198583

p6  -275.2507273589 0.2043724691    -201.5617118211 -20.2877717975
ADD REPLY
0
Entering edit mode

You will find this useful: How to add images to a Biostars post
You can't link/upload images on your local desktop to Biostars directly.

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

Thank you!

ADD REPLY
2
Entering edit mode
5.8 years ago
apply(my_data [,-1],2, shapiro.test)

try an easier one:

library(MVN)
mvn(my_data[,-1], univariateTest = "SW")$univariateNormality
ADD COMMENT

Login before adding your answer.

Traffic: 2453 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6