[R] pgmm error message, Error in terms.default(formula) : no terms component nor attribute

2016-01-22 Thread Xin Shi
Dear I try to use pgmm to estimate dynamic model for panel data. I got the message below. It is appreciate that you could help on this. data<-read.csv("G:/MMU/Research/Urbanlisation/paneldata.csv",sep=",", header=TRUE) library(plm) library(Formula) urban<-pdata.frame(data, index=c("id","year_b

[R] problem with installing packages

2011-02-11 Thread xin shi
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.co

[R] integrate of function f(x,y,z) respect to x only

2010-07-20 Thread Xin Shi
Dear: Anyone has experience to use R integrate a function with more than two dimensions, but you only need to integrate the function respect to one variable, say x. Because I also want to maximise the log-likelihood after integration of function respect to x. Thanks! Xin --- Dr.Xin Shi Se

[R] regularised incomplete beta function

2009-12-16 Thread Xin Shi
Dear: I am trying to work out the regularised incomplete beta function in R. I searched google on this and found UCS library. But I can not find this in R packages. Does anyone have use this before or how to insert UCS in R? Many Thanks! Xin Xin --- Dr.Xin Shi Senior Lecturer in Sta

[R] problem with ci for lmer

2009-05-21 Thread Xin Shi
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 addi

[R] how to take away the same varible when I use "merge"

2009-05-12 Thread Xin Shi
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 __ R-help@r-project.org mailing li

[R] how to do trend.test for subset data

2009-03-24 Thread Xin Shi
Dear: I try to do the trend.test {pastecs} for a subset data. Anyone have this experience? Many thanks! Xin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] how to add labels to existing plot for the subset of data

2009-03-13 Thread Xin Shi
Dear: I am trying to plot x against y for a particular subset of data, say z=1, and labelling data by another variable say, k. My data are: y<-c(69.7, 82.3, 66.3, 107.3, 90.1, 63.7, 82, 74.4, 61.7, 93.4, 73.4, NA, NA, 70.7, 67.7, NA, NA) x<-c(71.2, 82.6, 67.4, 107.1, 90.5, 66.7, 83.9, 73.9, 61

[R] how can I compare two vector by a factor

2009-02-27 Thread Xin Shi
Hi, I used Wilcox.test to carry out mann whiteney test when paired=false. However, I want to see the comparison of two variables, e.g. pre and post, grouped by treatment. Anyone has this experience? Thanks! Xin [[alternative HTML version deleted]] ___

[R] how to read data from the different worksheets in the same Excel file

2009-01-14 Thread Xin Shi
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]] __ R

[R] how to plot histogram plot and fitted distributions on the same graph

2009-01-08 Thread Xin Shi
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; A

[R] keep function in stepAIC

2008-12-09 Thread Xin Shi
Dear: Does anyone use keep function in stepAIC command? If so, could you give an example? I try to use this function to choose some variables in all of possible models. Many Thanks! Xin [[alternative HTML version deleted]] __ R-he

[R] multinomial losgitic regression--vglm()

2008-12-08 Thread Xin Shi
Dear: I try to analysis multinomial logistic regression using vglm in VGAM package. However, I wonder how many levels of responses variable this command is suitable. I saw the examples in google search works for 3 levels, say 1,2,3. However, my response variable is more than 3 levels. Is it