Displaying 20 results from an estimated 30000 matches similar to: "simple randomization question: How to perform "sample" in chunks"
2009 Jul 19
1
Can I use "mcnemar.test" for 3*3 tables (or is there a bug in the command?)
Hello all,
I wish to perform a mcnemar test for a 3 by 3 matrix.
By running the slandered R command I am getting a result but I am not sure I
am getting the correct one.
Here is an example code:
(tt <- as.table(t(matrix(c(1,4,1 ,
0,5,5,
3,1,5), ncol = 3))))
mcnemar.test(tt, correct=T)
#And I get:
McNemar's Chi-squared
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all,
I wrote a small function to add labels for outliers in a boxplot.
This function will only work on a simple boxplot/formula command (e.g:
something like boxplot(y~x)).
Code + example follows in this e-mail.
I'd be happy for any suggestions on how to improve this code, for example:
- Handle boxplot.matrix (which shouldn't be too hard to do)
- Handle cases of complex
2009 Jul 25
2
labelling points plotted in a 2D plan
I created a 2 D plan:
> plot(range(-2.5,0.95),range(0.00,1.00),type="n",axes=TRUE)
I made a projection of points with their coordonates (X,Y) in that plan
> fullpoints=read.csv2("fullpoints.csv",h=T)
> plot(fullpoints)
The points are listed in that .csv file it is organized this way:
0,48875 0,142857143
0,409 0,142857143
0,45611 0,25
0,49833 0,222222222
0,61158
2012 Jan 19
2
Sweave question - Setting Soutput code chunks to stay inside page margins?
Hello all,
Sometimes I get to make an R code chunk (in Sweave) which is longer then
the margins of the page. Is there a way to force it to "go to the next
line" (in Sweave) once that happens?
Here are two cases this happens in the resulting .tex file (one is a "hard"
case, and the other is simpler)
\begin{Schunk}
\begin{Sinput}
>
2009 Feb 18
2
[package-car:Anova] extracting residuals from Anova for Type II/III Repeated Measures ?
Hello dear R members.
I have been learning the Anova syntax in order to perform an SS type III
Anova with repeated measures designs (thank you Prof. John Fox!)
And another question came up: where/what are the (between/within) residuals
for my model?
############ Play code:
phase <- factor(rep(c("pretest", "posttest", "followup"), c(5, 5, 5)),
2013 Nov 06
3
Basic question: why does a scatter plot of a variable against itself works like this?
Hello all,
I just noticed the following behavior of plot:
x <- c(1,2,9)
plot(x ~ x) # this is just like doing:
plot(x)
# when maybe we would like it to give this:
plot(x ~ c(x))
# the same as:
plot(x ~ I(x))
I was wondering if there is some reason for this behavior.
Thanks,
Tal
----------------Contact
Details:-------------------------------------------------------
Contact me:
2009 Jul 26
1
Is there an R implementation for the "Barnard's exact test" (a substitute for fisher.test) ?
Hello R help members. I came across today with an article on Barnard's exact
test (http://www.cytel.com/Papers/twobinomials.pdf), that is supposed to
give a more powerful fisher.test - Because it doesn't assume that we know
the row and column totals are in advance. Any pointers to such a function ?
Thanks, Tal
--
----------------------------------------------
My contact information:
2008 Oct 27
2
Need help
Hi All,
I am new comer here and for Statistics R. I want to know how to use R
to calculate one way repeated measure ANOVA, for example, on three
groups of data.
I appreciate if someone can help me solve this problem.
John
2009 Sep 15
2
How to calculate min of a dataset that contains empty column
Hi all,
I have got a dataset like the following:
a b c
1 5
2
3 7
I am taking the minimum of each column and use it as the minimum of the
y-axis of my graphs. My scripts (simplified version) are like the following:
f<-array
f[1]=a
f[2]=b
f[3]=c
for i in 1:3
name=f[i]
ymin<-min(dataset$f[i])
plot(x,y,ylim=c(ymin,100))
The script stops at b, because the min function returns inf
2009 Jul 01
1
Are there any bloggers amoung us going to useR 2009 ?
*(note*: This is an R community question, not a statistical nor coding
question. Since this is my first time writing such a post, I hope no one
will take offence of it.)
Hello all,
I will be attending useR 2009 next week, and was wondering if there are any
of you who are *bloggers *intending to participate and report on useR 2009?
If so - I would love to know your blogs URL so as to follow you.
2009 Mar 29
1
[cluster package question] What is the "sum of the dissimilarities" in the pam command ?
Hello Martin Maechler and All,
A simple question (I hope):
How can I compute the "sum of the dissimilarities" that appears in the pam
command (from the cluster package) ?
Is it the "manhattan" distance (such as the one implemented by "dist") ?
I am asking since I am running clustering on a dataset. I found 7 medoids
with the pam command, and from it I have the
2009 Aug 10
3
Bug in "seq" (or a "feature") ?
(I use R 2.9.1 with win XP)
If I run this code:
seq(-0.1,.9, by = .05)[seq(-0.1,.9, by = .05) <= 0.5]
I get this output:
[1] -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45
Why is 0.50 not in the results ?
(It seems that it gives a slightly bigger number then 0.5 but I don't
understand why it does that)
Where as if I try:
seq(-0.1,.9, by = .05)[seq(-0.1,.9, by = .05) <=
2008 Dec 17
1
bug (?!) in "pam()" clustering from fpc package ?
Hello all.
I wish to run k-means with "manhattan" distance.
Since this is not supported by the function "kmeans", I turned to the "pam"
function in the "fpc" package.
Yet, when I tried to have the algorithm run with different starting points,
I found that pam ignores and keep on starting the algorithm from the same
starting-points (medoids).
For my
2009 Jul 24
2
How to test frequency independence (in a 2 by 2 table) with many missing values
Hello dear R help group.
My question is statistical and not R specific, yet I hope some of you might
be willing to help.
*Experiment settings*: We have a list of subjects. each of them went
through two tests with the answer to each can be either 0 or 1.
*Goal*: We want to know if the two experiments yielded different results in
the subjects answers.
*Statistical test (and why it won't
2009 Feb 21
1
variable/model selction (step/stepAIC) for biglm ?
Hello dear R mailing list members.
I have recently became curious of the possibility applying model
selection algorithms (even as simple as AIC) to regressions of large
datasets. I searched as best as I could, but couldn't find any
reference or wrapper for using step or stepAIC to packages such as
biglm.
Any ideas or directions of how to implement such a concept ?
Best,
Tal
--
2009 Apr 25
3
ANOVA/statistics question
(Have searched for this already)
Hi,
How do you find the strength of correlation between two variables using an
ANOVA table? "Pr(>F)" gives the statistical significance of the
association, but not the strength of the correlation.
See data (from R) below
Readable:
"Df" "Sum Sq" "Mean Sq" "F value"
2009 Mar 11
4
error.bars
Hi, I'm trying to use the function "error.bars", but the program don't
find it, and I dont't found any package with this function. Is there some
another functin to draw barplots with error bars?
Sueli Rodrigues
Eng. Agr?noma - UNESP
Mestranda - USP/ESALQ
PPG-Solos e Nutri??o de Plantas
Fones (19)93442981
(19)33719762
2009 Aug 30
1
Combining: R + Condor in 2009 ? (+foreach maybe?)
Hello dear R-help group (and David Smith from REvolution),
I would like to perform parallel computing using R with Condor (hopefully
using foreach or other recommended solutions, if available) for some
"Embarrassingly parallel" problem.
I will start by listing what I found so far, and then go on asking for help.
So far I found the a manual by Xianhong Xie from Rnews_2005-2 (see page
2009 Mar 18
1
Reading a file line by line - separating lines VS separating columns
Hello all.
I wish to read a large data set into R. My current issue is in getting the
data so that R would be able to access it. Using read.table won't work
since the data is over 1GB in size (and I am using windows XP), so my plan
was to read the file chunk by chunk and each time move it into bigmemory
(I'll play with that when the time will come, maybe ff is better ?!).
I encountered
2009 Mar 28
4
Selecting elements from a vector (a simple question with weird results)
Hello people.
I wish to reorder a simple vector of numbers by another vector of the order
(and then do the same, but with a data frame rows)
I try this (which doesn't work) :
> aa <- c(3, 1 ,2 )
> aa[aa]
[1] 2 3 1
The same won't work if I try to order a data frame:
> data.frame(matrix(c(3,1,2), 3,2))[c(3,1,2),]
X1 X2
3 2 2
1 3 3
2 1 1
How should I do this?
p.s: