Displaying 20 results from an estimated 1000 matches similar to: "Please Help pairwise.t.test!!"
2009 Sep 08
2
strange results in summary and IQR functions
Dear R users,
Something is strange in summary and IQR. Suppose, I have a data set and I
would like to find the Q1, Q2, Q3 and IQR.
x<-c(2,4,11,12,13,15,31,31,37,47)
> summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.00 11.25 14.00 20.30 31.00 47.00
> IQR(x)
[1] 19.75
However, I test the same data set in SAS "proc univariate", and SAS shows
that
2009 Sep 29
4
Something wrong with my function Please Help
Hi R users,
I try to build a function to compute odds ratio and relative risk however
something wrong. I stuck for many hours but I really don't know how to solve
it. Would someone please give me a hint?
> OR.RR<-function(x){
+ x <- as.matrix(any(dim(x)==2))
+ OR<-(x[1,1]*x[2,2])/(x[1,2]*x[2,1])
+ RR<-(x[1,1]/(sum(x[1,])))/(x[2,1]/(sum(x[2,])))
+
2010 Feb 23
3
Use 2 "ifelse" to sort data
Dear R users,
I have a question how to use 2 "ifelse" to sort my data. Such as
from 11 to 20 assign to A; 6 to 10 assign to B, and the rest of them assign
to C
a<-1:20
tt<-ifelse(a>10, "A",no=ifelse( 5< a <=10, "B", "C"))
Many Thanks
Chunhao
--
View this message in context:
2008 Jul 30
2
Repeated Measure ANOVA-Old question
Hi R users,
I google the website and I found that there are three ways to perform
repeated measure ANOVA: aov, lme and lmer.
http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg58502.html
But the questions are which one is good to use and how to do post-hoc test?
I use the example that is provided in the above link and I try
> tt<-aov(p.pa~group*time+Error(subject/time),data=P.PA)
2009 Feb 24
1
Help How to use a loop to do pair comparison
Hi R users,
I have a question. How can I use for loop to do pair comparisons. For
example,
> x<-c(1,2,3)
> result<-matrix(data=NA, nrow=choose(3,2), ncol=1)
> for(i in 1: length(x))
+ { result[i,]<-ifelse(x[i] > x[i+1], yes="Big", no="Small")
+ result}
> result
[,1]
[1,] "Small"
[2,] "Small"
[3,] NA
2008 Sep 06
1
Help use try function with boot
Hi R users,
Is is possible for me to use the try function with boot? I would to do
the bootstraping with a nonlinear model(it works well when R < 1000).
But it does not work very well (when R is large) thus I try to use
"try" to resolve. I put the try function in two cases:
case1: put the try in front of the boot
> c1.try<-try(boot(c1data, statistic = c1.fun,
2008 Sep 24
2
Bug in "is" ?
Hi R users
Is there anything wrong in "is" function? (R 2.7.2)
I believe that everyone will agree that "7" is an integer, right? but
why R shows 7 is not an integer
> is.integer(7)
[1] FALSE
> is(7,"integer")
[1] FALSE
> is(as.integer(7), "integer")
[1] TRUE
Thank you very much in advance
Chunhao
2008 Sep 24
2
Bug in "is" ?
Hi R users
Is there anything wrong in "is" function? (R 2.7.2)
I believe that everyone will agree that "7" is an integer, right? but
why R shows 7 is not an integer
> is.integer(7)
[1] FALSE
> is(7,"integer")
[1] FALSE
> is(as.integer(7), "integer")
[1] TRUE
Thank you very much in advance
Chunhao
2008 Sep 02
1
correlation with boot
Hi R users,
I have one simple question but I really don't know why I can't get it work.
The data was adopted from Efron's An introduction to the bootstrap book.
> nlaw
LSAT GPA
[1,] 576 3.39
[2,] 635 3.30
[3,] 558 2.81
[4,] 578 3.03
[5,] 666 3.44
[6,] 580 3.07
[7,] 555 3.00
[8,] 661 3.43
[9,] 651 3.36
[10,] 605 3.13
[11,] 653 3.12
[12,] 575 2.74
2008 Apr 04
2
pairwise.t.test for paired data
Dear R-help, I have a question about pairwise.t.test and adjustment for
multiple comparisons for paired data points.
I have the following data:
n=c("x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "y", "y",
"y", "y", "y", "y",
2008 Sep 09
1
S.O.S "try" doesnot work in boot?
First thanks for Jinsong's suggestions
I would like to do a bootstrap in a nonlinear model. But it fails to
converge in most of time. (it did converge if I just use nls without
boot). Thus, I use "try" function to resolve my problem. This
following code is from Jinsong's suggestion.
h1a.nls<-nls(density~nmf(time, alpha, delta, psi, tau, gamma),data=h1a,
2009 Oct 27
1
Output pairwise.t.test to data.frame
# I'm doing a pairwise.t.test on a large dataset and need the output in a
data frame so I can work further with it, e.g. so I can export it to a
spreadsheet. Is there any way to coerce the results to an exportable format?
# For example, if I do:
test <- pairwise.t.test(numbers, factors, p.adj="bonferroni")
# and then
write.table(test, file="output.csv",
2011 Apr 28
3
Simple General Statistics and R question (with 3 line example) - get z value from pairwise.wilcox.test
Hi there,
I am trying to do multiple pairwise Wilcoxon signed rank tests in a
manner similar to:
a <- c(runif(1000, min=1,max=50), rnorm(1000, 50), rnorm(1000, 49.9,
0.5), rgeom(1000, 0.5))
b <- c(rep("group_a", 1000), rep("group_b", 1000), rep("group_c",
1000), rep("group_d", 1000))
pairwise.wilcox.test(a, b, alternative="two.sided",
2009 Dec 02
4
Finding cases in one subset that are closet to another subset
Good afternoon
Running R2.10.0 on Windows
I have a data frame that includes (among much else) a factor (In_2006) and a continuous variable (math_3_4). I would like to find the 2 cases for In_2006 = 0 that are closest to each case where In_2006 = 1.
My data looks like
In_2006 math_3_4
0 55.1
1 51.6
1 18.1
1 26.6
1 14.1
2009 Jun 14
6
a proposal regarding documentation
Proposal
That a new mailing list be established
that pertains exclusively to R documentation.
The purpose of the list would be to discuss
weak sections of the documentation and
establish fixes for those weak spots.
Pro
If it works, there would be better documentation.
It would be an excellent opportunity for newish
and/or less technical people to contribute to R.
In some respects such people
2011 Aug 26
0
Multiply Iterated Measurements and Pairwise Comparison
I am familiar with pairwise t-tests, corrections for multiple testing, etc. however I have a problem whose answer I have not found after extensive R-help archive and Google searching.
What I have done in the past:
I have N items which are measured, exposed to a condition, and then measured again. I wish to know if the condition changes the items so I can perform a t-test. Better yet I can
2000 Jun 20
0
Pairwise comparisons/contrasts from a coxph model?
Hello,
this is probably more a statistical question than an R-specific problem, but
I'll risk it.
I've fitted a Cox Proportional hazard model with one factor Treatment (seven
levels) as a predictor variable. The general Null hypothesis (all groups
show the same survival behaviour) is clearly rejected. Now, is there any
(statistically sensible) way of doing pairwise comparisons and/or
2009 Oct 21
3
Missing data and LME models and diagnostic plots
Hello
Running R2.9.2 on Windows XP
I am puzzled by the performance of LME in situations where there are missing data. As I understand it, one of the strengths of this sort of model is how well it deals with missing data, yet lme requires nonmissing data.
Thus,
m1.mod1 <- lme(fixed = math_1 ~ I(year-2007.5)*TFC_,
data = long,
random =
2009 Nov 02
7
qqplot
Hi,
We could use qqplot to see how two distributions are different from each other. To show better how they are different (departs from the straight line), how is it possible to plot the straight line that goes through them? I am looking for some thing like qqline for qqnorm. I thought of abline but how to determine the slope and intercept?
Best wishes,
Carol
2009 Oct 21
1
Question on mixed effect models with LME
Good afternoon
Using R 2.9.2 on a machine running Windows XP
I have a longitudinal data set, with data on schools and their test scores over a four year period. I have centered year, and run the following
m1.mod1 <- lme(fixed = math_1 ~ I(year-2007.5)*TFC_,
data = long,
random = ~I(year-2007.5)|schoolnum,
na.action = "na.omit")
where