Displaying 20 results from an estimated 3000 matches similar to: "loop? apply? I want to repeat a task through 208 itterations."
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
2010 Apr 09
6
How to run Shapiro-Wilk test for each grouped variable?
I want to run Shapiro-Wilk test for each variable in my dataset, each
grouped by variable groupFactor.
I have these working commands:
> data.n<-names(data) # put names into a vector called data.n
> by(eval(parse(text=(paste("data",data.n[3],sep="$")))), data$factor, shapiro.test) #run shapiro.test
but I must to change the variable number manualy. How to automate
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
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
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
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()
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",
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
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 ?
2016 Sep 13
2
t-test y distribución de variables
Hola,
Estoy analizando unos datos para una tesis doctoral.
Durante la investigación se han recogido distintas variables clínicas de
dos grupos (n=30 y n=40). Me encuentro que las comparaciones de medias
se han realizado mediante t-tests sin preocuparse de estudiar la
distribución de las variables. Al revisar si las variables se ajustan a
la distribución normal, aunque los QQplots no tienen
2011 Nov 03
1
Why can't this function be used with the 'by' command?
Why can't this function be used with the 'by' command?
> x = array(runif(16), dim=c(8,2))
> x = data.frame(x)
> x$group = rep(c('wt', 'app'), each=4)
> shapiro.p = function(x) shapiro.test(x)[[2]]
> apply(x[,1:2], 2, shapiro.p)
X1 X2
0.4126345 0.2208781
> by(x[,1:2], x$group, shapiro.p)
Error in `[.data.frame`(x, complete.cases(x)) :
2006 Feb 03
8
Confused about what I am seeing with domain names
I could not get wbinfo -g/u to work and was seeing a bunch of errors
related to to not being able to enumerate groups. I saw somebody use
idmap backend = ad and added this since I have been struggling to get ad
working (still not working). Now, when I run wbinfo -g/-u, I am getting
groups and users, but the domain it shows is different than what I
expected. My domain I was using for workgroup
2011 Apr 26
3
Normality tests
I have a large amount of data which I break down into a collection of
vectors of 100-125 values each. I would like to test the normality of the
vectors and compare them. In the interactive mode I can test any one vector
using the Shapiro-Wilk test or the Kolmogorov-Smirnov test. My problem is
that when I try to write out the results to a file, the term output is a
mixture of alpha characters
2006 Mar 02
3
FW: samba as a domain member
whoops, forgot to copy the list on it. sorry.
Well, an update. I can log in to the console using any domain profiles, but, I can not access the exposed home directory through NetBeui (My Network Places/Network Neighborhood).
Also, how should I configure /etc/pam.d/sshd to allow domain users to authenticate and logon through an ssh client (PuTTY?, OpenSSH?)
-----Original Message-----
From:
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?
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
2007 Jun 01
2
tapply
Hello, I want to conduct normality test to a series of data and get the
p-value for each subset. I am using the following codes, but it does not
work.
tapply(re, list(reg, ast), pvalue(shapiro.test))
Could anyone give me some advice? Many thanks.
--
View this message in context: http://www.nabble.com/tapply-tf3851631.html#a10910748
Sent from the R help mailing list archive at Nabble.com.
2011 May 05
3
Null
This is probably a very simple question but I am completely stumped!I am
trying to do shapiro.wilk(x) test on a relatively small dataset(75) and each
time my variable and keeps coming out as 'NULL', and
> shapiro.test(fcv)
Error in complete.cases(x) : no input has determined the number of cases
my text file looks like this:
case
1.600972896
1.534026106
1.633468456
1.69019608
2010 May 25
2
Get output values in a table
Hi,
I use two similar scripts to put p-values of shapiro.test and, respectively,
of wilcox.test in a table:
a)
d <- data.frame(dataset$GroupFactor, dataset[2:11])
# p-values for the shapiro test (by levels of GroupFactor)
with(d, aggregate(d[,-1], list(d[,1]), FUN = function(x)
shapiro.test(x)$p.value))
b)
d <- data.frame(dataset$GroupFactor, dataset[2:11])
with(d, aggregate(d[,-1],