search for: chunhao

Displaying 20 results from an estimated 38 matches for "chunhao".

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: http://n4.nabble.com/Use-2-ifelse-to-sort-data-tp1565422p1565422.html Sent from the R help mailing list archive at Nabble.com.
2008 Jul 30
2
Repeated Measure ANOVA-Old question
...ow 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) > TukeyHSD(tt) Error in UseMethod("TukeyHSD") : no applicable method for "TukeyHSD" Any suggestions? Appreciate in advance~ Chunhao
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,]))) +
2009 Feb 24
1
Help How to use a loop to do pair comparison
..."Big", no="Small") + result} > result [,1] [1,] "Small" [2,] "Small" [3,] NA I want to compare (1 vs. 2), (1 vs. 3), (2 vs.3) I know I miss something but I just can not get it work. Could anyone give me a hint? Appreciate, Chunhao [[alternative HTML version deleted]]
2008 Sep 06
1
Help use try function with boot
..., tau=4.5, gamma=-1.2)),silent=T) > c1.try<-boot(c1data, statistic = c1.fun, R=3999) Error in nls(formula = density ~ nmf(time, alpha, delta, psi, tau, gamma), : Convergence failure: iteration limit reached without convergence Any suggestion will be helpful. Many thanks in advance Chunhao
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
2008 May 27
3
How to test significant differences for non-linear relationships for two locations
Hi List, I have to compare a relationship between y and x for two locations. I found logistic regression fits both datasets well, but I am not sure how to test if relationships for both sites are significantly different. I searched the r site, however no answers exactly match the question. I used Tukey's HSD to compare two means, but the relationship in my study was not simply linear. So I
2008 Sep 02
1
correlation with boot
...5 2.76 [14,] 572 2.88 [15,] 594 2.96 > nlaw<-as.matrix(law[,-1]) > corr.t<-function(data){ + return(boot::corr(data)) + } > law.boot<-boot(data=nlaw,statistic=corr.t,R=49) Error in statistic(data, original, ...) : unused argument(s) (1:15) many thanks for the help Chunhao
2009 Jun 12
1
Please Help pairwise.t.test!!
...know mean of A =20, B=21, and C=20.5 and I also know the standard error of A =1.1, B=2.2, C=3.2. Plus, I know A has 30 observations, B has 78, C has 45. But I do not have the raw data. Can I use pairwise.t.test to conduct a Bonferroni test? If yes, Could you give me a hint? Thank you so much Chunhao -- View this message in context: http://www.nabble.com/Please-Help-pairwise.t.test%21%21-tp23992763p23992763.html Sent from the R help mailing list archive at Nabble.com.
2010 Sep 05
2
Need Help .RData in Mac OS X, Please
Hi R Users, I was accidentally save R file when I quit R program. I try to delete but I am not sure the R saved file was successfuly delete or not. Now everyt time when I open the R, it always appears [R.app GUI 1.34 (5589) i386-apple-darwin9.8.0] [Workspace restored from /Users/ctu/.RData] I have read google, R help and Nabble but I still can't solve this problem. Could someone please
2008 Sep 24
2
Bug in "is" ?
...;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" ?
...;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 09
1
S.O.S "try" doesnot work in boot?
...590 0 0 t2* 0.08869433 0 0 t3* 1.26523275 0 0 t4* 3.93919567 0 0 t5* -1.41926966 0 0 all of the values of each column in h1a.boot$t are the same. Is anyone know to how I can solve this problem? Appreciate in advance Chunhao
2009 Dec 18
0
Compare two repeated measures mixed models
Hi R users, I have a statistical question. If I have two repeated measures models such as, m1, y=u+a+time+a:time+e m2, y=u+b+time+b:time+e How can I compare these two models (such as which one is the better predictor, a or b)? Many Thanks In Advance. Chunhao -- View this message in context: http://n4.nabble.com/Compare-two-repeated-measures-mixed-models-tp974511p974511.html Sent from the R help mailing list archive at Nabble.com.
2008 May 29
1
test for multivariate normality?
My stat textbook tells me that using Shapiro-Wilk test for each variable one by one is not equal to a test for multivariate normality as a whole. Does R have a function of testing for multivariate normality? Thanks. Hongsheng (Hank) Liao, Ph.D. Lab Manager Center for Quantitative Fisheries Ecology 800 West 46th Street Old Dominion University Norfolk, Virginia 23508 Phone:757.683.4571
2008 Jul 06
2
looking for alternative of 'if-else'
There is "if-else" loop if I have to choose 1 item from a 2-item list. However if I have a list of 4 items (let say) then how i can choose a single item without employing 'if-else' loop? I mean in VBA I can use "select-case", is there any equivalent in R as well? Regards, [[alternative HTML version deleted]]
2008 Jul 08
0
Fwd: Re: extracting index list when using tapply()
...the random data generating functions and show us what you'd like, we can then more easily help. ctu at bigred.unl.edu wrote: > Hi, > How about using "subset"? > x1<-tapply(subset(years, length(area)>20), function(x) length(unique(x))) > > I hope this works > Chunhao > > > Quoting hesicaia <dboyce at dal.ca>: > >> >> Hello, >> The quick version of my question is how can I extract a matrix instead of >> a vector using tapply()? I would like to be able to access both the results >> of tapply() and also the index v...
2008 Jul 09
1
Loglikelihood for x factorial?
Hi Rers, I have a silly question. I don't know how to express the loglikelihood function of 1/(x!) where x=x1,x2,....xn in R. Could anyone give me a hint? Thank you in advance. Chunhao Tu
2008 Jul 25
1
create multi windows plot at the same time
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080725/35c79256/attachment.pl>
2009 Jan 28
1
Please Help for Augmented Prediction Plot
...ed(out.nlme....)) to get the augmented prediction plot. However, because the scale of the covariate is too large thus I am not able to see the detail difference at c(0,0.01, 0.1, and 1). Could anyone tell me how to enlarge the plot at that range "c(0,0.01, 0.1, and 1)" ? many many thanks Chunhao _________________________________________________________________ Show them the way! Add maps and directions to your party invites. [[alternative HTML version deleted]]