Displaying 20 results from an estimated 2000 matches similar to: "Shapiro.test on data frame"
2009 Sep 14
4
local sequence function
hey,
I can not find a function for the following problem, hopefully you can
help me.
I have a vactor like this one
v = c(NA,NA,TRUE,TRUE,NA,TRUE,NA,TRUE,TRUE,TRUE)
and I would like to the TRUE values by the their "local sequence
number".
This means, the result should look thike this:
c(NA,NA,1,2,NA,1,NA,1,2,3)
Of course I could solve the problems using a loop, but this would be
2011 May 03
3
Axis trouble
Hello Everyone,
I am having problem in defining specific axis for
plotting a vactor.
vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4)
names(vecAVG)<-c("brain","heart","kidney","lung","blood")
par(mar=c(12,4.1,4.1, 2.1))
2012 May 02
2
output Shapiro-Wild results to a table
Hello,
I have applied the Shapiro test to a matrix with 26.925 rows of data using the following
F1.norm<-apply(F1.n.mat,1,shapiro.test)
I would now like to view and export a table of the p and W values from the Shapiro test, but I am not sure how to approach this.
I have tried the following with errors.
> write.table(x=F1.norm,file="I:/R_Work/F1/Shapiro.csv",
2003 Feb 10
2
shapiro.test
Hi
The shapiro.test function outputs a value of the W statistic, which
should be 1 if the distribution is normal, and a p-value for the test
(as the documentation states).
I'm a bit confused with some results. I'm getting a W=0.9977 and a
p-value=0.1889.
I was expecting that a W of 0.9977 would tell me that the distribution
is normal so p-value should be small ...
What am I missing ?
2001 Jul 02
2
Shapiro-Wilk test
Hi,
does the shapiro wilk test in R-1.3.0 work correctly? Maybe it does, but can
anybody tell me why the following sample doesn't give "W = 1" and
"p-value = 1":
R> x<-1:9/10;x
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
R> shapiro.test(qnorm(x))
Shapiro-Wilk normality test
data: qnorm(x)
W = 0.9925, p-value = 0.9986
I can't imagine a sample being
2006 Jul 12
2
shapiro.test() output
R Users:
My question is probably more about elementary statistics than the
mechanics of using R, but I've been dabbling in R (version 2.2.0) and
used it recently to test some data .
I have a relatively small set of observations (n = 12) of arsenic
concentrations in background groundwater and wanted to test my
assumption of normality. I used the Shapiro-Wilk test (by calling
shapiro.test()
2007 Jun 29
1
Shapiro Test P Value Incorrect? (PR#9768)
Full_Name: Jason Polak
Version: R version 2.5.0 (2007-04-23)
OS: Xubuntu 7.04
Submission from: (NULL) (137.122.144.35)
Dear R group,
I have noticed a strange anomaly with the shapiro.test() function. Unfortunately
I do not know how to calculate the shapiro test P values manually so I don't
know if this is an actual bug.
So, to produce the results, run the following code:
pvalues = 0;
for
2013 Apr 05
2
How to perform a grouped shapiro wilk test on dataframe
Hello,
I was wandering if it is possible to perform on a dataframe called 'all' a
shapiro wilk normality test for COUNTS by variable Group
ACTIVITY? Could it be done using plyer? I saw an eg that applies to an
array but not to a dataframe:
lapply(split(dataset1$Height,dataset1$Group),shapiro.test)
Any thoughts would be much appreciated.
My dataframe is in shape:
dat ACTIVIT
2024 Sep 02
2
Adding parameters for Benchmark normal distribution in shapiro.test
Hi,
In ?shapiro.test, there seems to be no option to pass mean and sd
information of the Normal distribution which I want to compare my
sample data to.
For example in the code below, I want to test my sample to N(0, 10).
shapiro.test(rnorm(100, mean = 5, sd = 3))
Is there any way to pass the information of the benchmark normal distribution?
2012 Apr 04
1
Shapiro-Wilk cpoefficients: 2 Qs
Greetings!
I want to have the coefficients that R uses in shapiro.test()
for the Shapiro-Wilk test for a prticular sample size, i.e.
the a[i] in
W = Sum(a[i]*x[i])/(Sum(x[i] - mean(x))^2)
(where the x[i] are sorted). Two questions:
Q1:
Is there a readymade R function from which I can extract these?
Q2:
I was wondering if I might be able to modify the code for the
function shapiro.test() so
2010 May 26
3
shapiro.test
Hi,
I am not so sure about an error note I got when using shapiro.test.
I imported some data into R by wrinting it into a .txt file via
> tab1<-read.table("etc....txt",header=T)
> attach(tab1)
The following object(s) are masked _by_ .GlobalEnv :
ozon
> ozon$V1 [1] 2.5 3.0 5.6 4.7 6.5 6.7 1.7 5.3 4.6 7.4 5.4 4.1 5.1 5.6 5.4 6.1 7.6[18] 6.2 6.0 5.5 5.8 8.2 3.1 5.8 2.6
Now
2005 Mar 08
4
Non-linear minimization
hello, I have got some trouble with R functions nlm(),
nls() or optim() : I would like to fit 3 parameters
which must stay in a precise interval. For exemple
with nlm() :
fn<-function(p) sum((dN-estdata(p[1],p[2],p[3]))^2)
out<-nlm(fn, p=c(4, 17, 5),
hessian=TRUE,print.level=2)
with estdata() a function which returns value to fit
with dN (observed data vactor)
My problem is that only
2008 Jul 12
5
shapiro wilk normality test
Hi everybody,
somehow i dont get the shapiro wilk test for normality. i just can?t
find what the H0 is .
i tried :
shapiro.test(rnorm(5000))
Shapiro-Wilk normality test
data: rnorm(5000)
W = 0.9997, p-value = 0.6205
If normality is the H0, the test says it?s probably not normal, doesn
?t it ?
5000 is the biggest n allowed by the test...
are there any other test ? ( i know qqnorm
2009 Feb 06
1
beanplot, Error in shapiro.test(x)
Dear all,
I am trying to create beanplots from a dataset for which boxplot works fine.
(MACOS, R 2.8.1 GUI 1.27 Tiger build 32-bit (5301))
I am getting the following error message:
Error in shapiro.test(x) : sample size must be between 3 and 5000
I am not even sure why the shapiro.test is being used, but is there any
workaround ?
Thanks !
Markus
[[alternative HTML version deleted]]
2000 Sep 25
1
Interpretation of Shapiro-Wilk
Can anybody tell me the exact meaning of the $statistic and $p.value
calculated by shapiro.test? Unfortunately it is not covered in my few
text books, and I cannot find the explanation in the R documentatiom or
on-line.
If I have a test statistic, T, which is Normally distributed with mean=m
and sd=s under the null hypothesis, then I can convert T to a p-value
(one-sided) using:
p <- pnorm(T,
2007 Sep 29
1
Shapiro-Welch W value interpretation
Hello,
I have tested a distribution for normality using the Shapiro-Welch
statistic. The result of this is the following:
Shapiro-Wilk normality test
data: mydata
W = 0.9989, p-value = 0.8791
I know that the p-value > 0.05 (for my purposes) means that the data
IS normally distributed but what I am not sure is with the W value,
what values tell me that the data is normally
2005 Nov 09
1
Problems with Shapiro Wilk's test of normality.
Hi,
I am trying to create a table with information from Shapiro Wilk's
test of normality.
However, it fails due to lack of sample size, it says, but the way I
see it, this is not a problem.
(See the table of sample sizes (almost) at the bottom).
Applying a different function using a similar ftable call is not a
problem (See the bottom table).
This is R 2.1.0 on Linux (Gentoo).
/Fredrik
2008 Nov 21
1
question about shapiro.test()
Hi all!
I tried to perform Shapiro-Wilk test for my sample of 243 values.
> Us
[1] -10.4 -13.1 -12.2 38.1 -18.8 -13.3 -11.7 29.3 49.7 6.8 12.7 16.3
[13] 5.8 -0.7 -29.4 4.1 38.8 -1.4 8.8 15.6 32.9 -5.3 19.1 35.8
[25] 4.0 -1.5 0.6 -4.2 -10.0 -4.0 1.1 48.9 -21.0 -5.3 5.8 -10.8
[37] 21.9 8.2 -3.2 -3.9 -2.3 12.6 -4.7 -8.0 11.8 27.4 -9.5 -20.8
[49]
2005 Nov 18
1
help on ks.test and shapiro.test
I have three files of data which are available at http://zhangw.com/
R/, varied at the number of data. I tried to use R to analyze using
shapiro.test, ks.test, and t.test. t.test ran as expected, however,
when I run shapiro.test and ks.test commands, error message always
occurred. Error message for
shapiro.test is
"Error in "[.data.frame"(x, complete.cases(x)) :
undefined
2011 Sep 30
3
error while using shapiro.test()
hey all, I'm just getting used to R and i'm having issues when it comes to
reading my data in rows rather than columns. any good advice would be much
appreciated !
here is the error:
> data1 <- read.table(file.choose(),header=T)
> x1 <- c(data1[1,1:5])
> shapiro.test(x1)
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic