search for: jasonshi510

Displaying 20 results from an estimated 21 matches for "jasonshi510".

2008 Feb 16
3
how to specify the location of tick mark on x axies
Dear: I want to plot barplot and let bar be in the middle of each x axis category. Do you have this experience? Many Thanks! Xin [[alternative HTML version deleted]]
2006 May 16
1
r-help@stat.math.ethz.ch
Dear All: I tried to fit negative binomial distribution to data in terms of mean and mean is also a quadratic function of another variable. The likelihood function is: function (parameters, y1,x11) { p<-parameters[1] alpha1<-parameters[1] beta1<-parameters[2] delta1<-parameters[3] mu<-alpha1+beta1*(x11)+delta1*(x11^2) ifelse(y1>=0|x11>=0, L<-
2006 Nov 15
1
OPTIM--non finite finite different [13]
Dear All: I used optim() to minimise the loglikelihood function for fitting data to negative binomial distribution. But there initial value of log-likelihood and iteration 10 value are reasonable. for example: initial value 1451657.994524 iter 10 value 47297.534905 iter 20 value -623478636.8236478 Then the iter 20 vlaue suddelnly changes to a negative value and in the end the error mesage is
2008 Feb 15
1
anyone know how to plot histograma and line in the same graph
Dear: I have two series data, which are: p1-obs p1-exp 13 13 20 23.296 22 18.139 19 14.972 10 12.576 16 10.658 8 9.0794 4 7.7625 3 6.6536 5 5.7141 7 4.9146 4 4.2321 0 3.648 4 3.1471 4 2.7168 2 2.3468 4 2.0283 2 1.7537 2 1.517 5 1.3127 1 1.1362
2008 Apr 10
2
how to read data from table based a condition
Dear All: I imported a table into R. But I want to read a variable (y) from this table conditional on another variable (x=1) in the table. y<-data[,7] x<-data[,3] I want to know the mean of y if corresponding x=1. I tried if (x==1) y3<-y It does not work. Anyone can give a help? Thanks! Xin [[alternative HTML version deleted]]
2008 Nov 11
1
how to export results of rcorr into excel
Hi, I try to export the outputs of rcorr into excel. but I got error message,"cannot coerce class "rcorr" into a data.frame". Actually i just need export part of results of this analysis,e.g. p-values or stat-values. Does anyone have sort of exprience before or you can help on how to export subset of results of analysis? Many Thanks! Xin
2008 Jul 17
1
histogram plot default
Dear All: I am trying to plot a series of data using histogram plot. But I want to change the default of setting for histogram plot. For example, I want to set frequency plot starting with zero. Many Thanks Xin [[alternative HTML version deleted]]
2009 Jan 14
2
how to read data from the different worksheets in the same Excel file
Dear All: I am trying to read the data from the different sheet but in the same Excel file. Does R provide this kind of command to do it? Anyone has experience on this? Thanks! Xin [[alternative HTML version deleted]]
2009 May 12
1
how to take away the same varible when I use "merge"
Dear: I am trying to merge two tables by a common variable. However, there are a few same variables which are in both of two tables. How can I take them away when I merge the two tables? Thanks! Xin
2008 Apr 14
3
how to add different type of lines (short dash, long dash) into current plot)
Dear I try to add three different lines (solid, short dash, long dash) in to current barplot. I saw there are types of lines ("p","b", ect). However, they are not what I request. Has nayone have this experience? Many Thanks! Xin [[alternative HTML version deleted]]
2007 Dec 19
2
can optimize solve paired euqations?
I used the command below, but R gives me the error message--syntax error. can anyone see the mistakes I made? optimize(function(x,y) + ((327.727-(1-0.114^10)*y*(1-x)/x/(1-x^y))+(9517.336-327.727 *(1+(1-x)*(1+y)/x-327.727)))^2 + interval=c(0,1)) At the same time, I use nlm() but R gives me the code $code [1] 3 function(vals) { x <- vals[1] y <- vals[2]
2008 May 05
1
how to plots two pairwise data sets into a same graph
Dear all: I fitted "Observed" into a distribution as frequency. The predicted values are calculated as "predicted" for frequency. bins is "x". I plot observed, predicted against x in a graph. the commond is here.
2009 Jan 08
2
how to plot histogram plot and fitted distributions on the same graph
Dear: I am trying to plot the histogram graph for my observed data. Then plot fitted distribution on the same graph of histogram plot in R. 1. histogram plot y. 2. based on "1", plotting y1 v. x; 3. based on "1", plotting y2 v. x; 4. based on "1", plotting y3 v. x; All of these four plots must be on the same graph. However, I found the difficulty is
2006 Jun 22
1
Why different results with different initial values for MLE (optim)!
Hi, All: I used optim() to minimise likelihood function for fitting the data to a partiuclar distribution. The function is converged and the value of log-likelihood is different when I change the intial value. Whether it means the program does not work well? Thanks! Xin [[alternative HTML version deleted]]
2007 Dec 17
2
can R solve these paired equations
Dear: I have a paired equation below. Can I solve (x,y) using R. Thanks! Xin A=327.727 B=9517.336 p=0.114^10 (1-p)*y*(1-x)/x/(1-x^y)=A A(1+(1-x)*(1+y)/x-A))=B [[alternative HTML version deleted]]
2008 Feb 15
1
question about calling winbugs in R
Dear All: Do you have any experience on calling winbugs in R enviorment? I uploaded R2winbgus, pktools, BRugs, ect. in order to call winbugs. In the end, I try to use bugs(). The error message still displays that bugs() can not find. Do you have any similar issue? If so, could you give your advice? Many Thanks! Xin [[alternative HTML version deleted]]
2008 Apr 14
0
how to make lien smoothly over barplot
Dear I try to make lines smoothly which are added on current barplot. I tried to use "smo" and it does not work. Has nayone have this experience? Many Thanks! Xin [[alternative HTML version deleted]]
2009 May 21
0
problem with ci for lmer
Hi, I am trying to calculate ci from lmer. However, I have the error message below: library(gmodels) library(lme4) fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy) ci(fm2) Error in as.vector(x, mode) : cannot coerce type 'S4' to vector of type 'any' In addition: Warning message: In mean.default(x, na.rm = na.rm) : argument is not
2011 Feb 11
1
problem with installing packages
Dear: I am recnetly trying to install some libraries. However, I found this issue for both my laptop and desktop even I uninstall and install it again. I even can not update the R now. I wonder if you have the similar issue. Thakns! Xin > chooseCRANmirror() Warning message: In open.connection(con, "r") : unable to connect to 'cran.r-project.org' on port 80. >
2006 Jul 22
1
ifelse command
Dear: I try to revise the maximum likelihood function below using something constrains. But it seems something wrong with it. Becasue R would not allow me to edit the function like this. It is very appreciate if you can help. function (parameters,y,x1,x2) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3)] delta1<-parameters[4] alpha2<-parameters[5]