[R] calculating mean matrix

2013-01-19 Thread ya
refers to number of matrices to be averaged. meanmtrx=apply(data,1:2,mean) but I do not know how to use the resulting data frames with cbind(). Maybe there are other better ways. Any advice is appreciated. Thank you very much. Have a nice day. ya [[alternative HTML version deleted

Re: [R] calculating mean matrix

2013-01-19 Thread ya
Dear Arun and David, Thank you very much for the response. Arun's code works. Thank you very much. David, I am sorry that I did not quite get the mean of your code, but still, thank you very much for helping. Best regards, ya > -Original Message- > From: r-hel

Re: [R] mlogit Package

2013-01-24 Thread ya
Hi Ehsan, What do you mean by percent correctly predicted? Could you provide more info about your model? It might be helpful to get a clue. ya From: ehsan rahimi Date: 2013-01-24 12:52 To: r-help Subject: [R] mlogit Package I have problem as follows: I use "mlogit package" to

[R] invalid labels; length 2 should be 1 or 0

2012-09-19 Thread ya
t; class(formi$bulg_3) [1] "numeric" The TeacherID_1 is the second level ID. bulg_1, bulg_2, and bulg_3 are continuous variables that need to be imputed. Why the factor() was used for continuous variables? Thank you very much. Best regards, ya [[alternative HTML version del

[R] invalid labels; length 2 should be 1 or 0

2012-09-20 Thread ya
continuous variables that need to be imputed. Why the factor() function was used here: Error in factor(x[, type == (-2)], labels = 1:n.class) Thank you very much. Best regards, ya ·¢¼þÈË£º ya ·¢ËÍʱ¼ä£º 2012-09-19 11:30 ÊÕ¼þÈË£º 32680822 Ö÷Ì⣺ Fw: invalid labels; length 2 should be 1 or 0

[R] V4Error in factor(x[, type == (-2)]

2012-10-03 Thread ya
: invalid labels; length 2 should be 1 or 0 The class variable is –2. Random effects 2, and fixed effects 1, not in the model: 0. Can anyone give me some advice please? Thank you very much. Best regards, ya [[alternative HTML version deleted]] _

[R] impute multilevel data in MICE

2012-10-19 Thread ya
and v14-v15. I can succeed in imputing the v1-v5 if v14 and v15 were not in the model, but I could not impute the missing values in v14 and v15. Thank you very much. Best regards, ya [[alternative HTML version deleted]] __ R-help@r-project.o

[R] factor score from PCA

2012-10-19 Thread ya
0 with Chi Square = 6.14 with prob < 0.29 Best regards, ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

[R] r cloud computing

2012-11-23 Thread ya
udstat? Does it even really exist? Thank you very much for any suggestions. Best regards, ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] finite mixture modeling

2012-06-14 Thread ya
the transition from one class to another across time points? Thank you very much. ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] EM for missing data

2012-07-21 Thread ya
h category of that IV. This is one of the reasons I can not fully move to R from SPSS. So any suggestions? Thank you very much. ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] combined EM dataset for missing data?

2012-07-21 Thread ya
h category of that IV. This is one of the reasons I can not fully move to R from SPSS. So any suggestions? Thank you very much. ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] combined EM dataset for missing data?

2012-07-21 Thread ya
Thanks Bert. So far I have not found any way that output a single data set which combines all the imputed data sets (say, 50 imputed data sets). Probably I missed something, but could you share some information about it, maybe a link? Thank you very much for helping. ya From: Bert Gunter

Re: [R] EM for missing data

2012-07-22 Thread ya
is, but my guts told me this may not be a good idea since the estimates and standard error, significance... , etc can not be just simply averaged. Also, I understand that single imputation in this situation may not be appropriate. Maybe I just asked for too much:) Best regards, ya From:

Re: [R] FIML using lavaan returns zeroes for coefficients

2012-07-23 Thread ya
Hi Miles and Yves, I agree with Miles to use lavaan to do regression so that FIML can be used. This is one of the amazing things that lavaan can do. If lavaan can handle missing values for the univariate regression using FIML, I don't see why you want to avoid it. ya From: Andrew

[R] impute multilevel data in MICE

2012-08-17 Thread ya
lues for the intercept term? I already have the unit ID variables in the data set, should I change all the values of it to -2? and what does 0 and 1 in "R> pred["popular", ] <- c(0, -2, 0, 2, 1, 2, 0) " mean? 4. Is there any

[R] pooling in MICE

2012-03-30 Thread ya
16587 0.2015711 0.1960397 0.3745362 0.2108851 0.2545268 0.4241958 0.2146440 [16] 0.2520252 0.2380274 0.2131245 0.3006583 0.2464491 0.2915607 0.2173454 0.1970864 0.1422042 Thank you very much. YA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] meta-analysis, outcome = OR associated with a continuous independent variable

2012-04-05 Thread ya
LIKE:) On 2012-4-5 15:03, Viechtbauer Wolfgang (STAT) wrote: I do not see any major difficulties with this case either. Suppose you have OR = 1.5 (with 95% CI: 1.19 to 1.90) indicating that the odds of a particular outcome (e.g., disease) is 1.5 times greater when the (continuous) exposure

[R] how to save multiple work space

2012-04-10 Thread ya
Hi guys, I have a question. I am running 3 R sessions simultaneously for different analysis. I found out that when R quit, only objects in one of these sessions was saved in the work space. How can I save objects of all 3 R sessions? Thank you very much. YA

Re: [R] how to save multiple work space

2012-04-11 Thread ya
together:) Thank you very much. This save me lots of time! Best regards, ya On 2012-4-10 15:14, Petr PIKAL wrote: Hi You'll need to save them manually to avoid name conflicts -- save.image() is the function to do so but you need to give a file name. Or it is necessary have separate folde

Re: [R] how to save multiple work space

2012-04-11 Thread ya
together:) Thank you very much. This save me lots of time! Best regards, ya On 2012-4-10 15:14, Petr PIKAL wrote: Hi You'll need to save them manually to avoid name conflicts -- save.image() is the function to do so but you need to give a file name. Or it is necessary have separate folde

[R] quick question about lme()

2012-04-14 Thread YA
+G.HRS,random=~1+LEAD|GRP) ? Thank you very much. Best regards, YA __ 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/posting-guide.html and provide commented

Re: [R] quick question about lme()

2012-04-14 Thread YA
Hi Thierry, Thank you very much. Best regards, YA On 2012-4-15 1:06, ONKELINX, Thierry wrote: Both specifications are the same model. An intercept is added by default unless you use +0 or -1 like ~0 + LEAD|GRP or ~ -1 + LEAD|GRP Van: r-help-boun

Re: [R] Installation of R 2.15.0

2012-04-16 Thread ya
Hi Partha, two different R version can coexist together, in the same "R" folder. YA On 2012-4-16 13:44, Partha Sinha wrote: I want to install R 2.15.0 without uninstalling R 2.13 (currently using ). if I install can upgrade take place or we will install two instances o

[R] "parallel" package

2012-04-28 Thread ya
it's more efficient by paralleling my CPU. I got an intel dual core i5 processor in a Thankpad x201 laptop. And I have used install.packages ("parallel") in R 2.15 on both linux and windows xp, no package installed. So maybe this package is not on cran? Any idea?

Re: [R] "parallel" package

2012-04-29 Thread ya
, and there are 4 charts in the task manager on windows xp(meaning 4 cpus or 4 cores?). However, I failed to figure out how to combine the mice function with the package "parallel". Any suggestions how I should write the code? Thank you very much. ya On 04/29/2012 10:47

[R] parallel package

2012-04-29 Thread ya
mc), mice(data2, m = 10)) : > all scheduled cores encountered errors in user code > > > I have a intel dual core i5 processor, and there are 4 charts in the > task manager on windows xp(meaning 4 cpus or 4 cores?). However, I > failed to figure out how to combine the mice function wit

[R] "parallel" package

2012-04-30 Thread ya
Hi Uwe, Thank you very much for the suggestions. ya ya From: Uwe Ligges Date: 2012-04-30 15:18 To: ya CC: Indrajit Sengupta; r-help@r-project.org Subject: Re: [R] "parallel" package On 29.04.2012 12:01, ya wrote: > Hi Uwe and Indrajit, > > Thank you very much for the

[R] read multiple dataset at one time

2012-04-30 Thread ya
Hi, Is it possible to read, say 100 dat files in one time? I want to combine these 100 data set into one single dat file. Any suggestions? Thank you very much. ya [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] convert 400 numeric variables to categorical together

2012-05-08 Thread ya
Hi everyone, Is there anyway I can convert more than 400 numeric variables to categorical variables simultaneously? as.factor() is really slow, and only one at a time. Thank you very much. ya [[alternative HTML version deleted]] __ R-help@r

[R] convert 400 numeric variables to categorical together

2012-05-08 Thread ya
the number of variables I need to convert getting more, I need to keep left clicking mouse to confirm the conversion (400 times) because as.factor() can only convert 1 variable at a time. So I am thinking if there is any faster way. Thank you very much. Best regards, ya ya From: R. Michael

[R] bigmemory

2012-05-10 Thread ya
g.matrix must have at least one row and one column And here is the example code: > x <- read.big.matrix("airline.csv", header=TRUE, + backingfile="airline.bin", + descriptorfile="airline.desc", + type="integer") So, what was wrong? Any suggestions p

[R] bigmemory

2012-05-10 Thread ya
ass generated by bigmemory package to a data.frame? Thank you very much. ya __ 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/posting-guide.html and provide commen

[R] ff question

2012-05-11 Thread ya
ted. Any advice are appreciated. Thank you very much. Best regards, YA __ 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/posting-guide.html and provide commented, min

[R] bigmemory

2012-05-11 Thread ya
for handling complicated analysis situation. This is just a general thought. Thank you very much. ya From: Jay Emerson Date: 2012-05-11 14:44 To: ya; r help Subject: RE: bigmemory To answer your first question about read.big.matrix(), we don't know what your acc3.dat file is, but it doesn&

[R] bigmemory

2012-05-11 Thread ya
Hi Jay, Thanks for the reply:) Could you show me a link of the c++ examples? Thank you very much. ya ya From: Jay Emerson Date: 2012-05-11 20:12 To: xinxi813 CC: r-help Subject: Re: bigmemory R internally uses 32-bit integers for indexing (though this may change). For this and other

Re: [R] linux

2012-05-27 Thread ya
install R on my tiny core linux. Good luck:) ya From: Soheila Khodakarim Date: 2012-05-27 18:15 To: r-help Subject: [R] linux Dear All Pleade give me an URL that I can download R for cenos linux 64 bit. [[alternative HTML version deleted]] __ R-help

Re: [R] linux

2012-05-27 Thread ya
Hi Rich£¬ You mean, the R source code package contains the FORTRAN code? I install gcc every time before I try to compile R, still, it shows lack of a bunch of compilers... ya From: Rich Shepard Date: 2012-05-27 18:14 To: r-help Subject: Re: [R] linux On Sun, 27 May 2012, ya wrote: >

[R] Mixed Ordinal logistic regression: marginal probabilities and standard errors for the marginal probabilities

2011-05-12 Thread Ma Ya
probabilities and standard errors for the marginal probabilities. Which option in lmer would give me those two kind of values? Thank you. Ya Ma [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] K-M probability for each subject

2011-05-19 Thread hsu ya-hui
Dear R-user, I would like to get the survival probability (surv) for each subject id. That is, I want to have additional column surv as follows: id OS OS_DUR surv eg: fitKM<-survfit(Surv(OS_DUR,OS)~1,data=data) fitKM$surv # this will only give me survival probability and

[R] Question regarding to joint model using JM package

2011-07-07 Thread hsu ya-hui
Dear R users, I use "fitted" function in JM package to get fitted marginal survival function for each subject and then plot marginal survival function for the event process (x-axis: time, y-axis: survival). Is it possible that I could get pointwise 95%CI for this survial function? Thanks, Kate

Re: [R] Problems with lm()

2008-06-20 Thread Hsin-Ya Lee
ly do not know where the problem is. How can I do? Best regards, Hsin-Ya Andrew Robinson-6 wrote: > > In your data, subject is nested within sequence. Was that your > intention? > >> a<-c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,

Re: [R] Problems with lm()

2008-07-01 Thread Hsin-Ya Lee
Dear Dr. Dalgaard Sorry for delay reply.. That's exactly what I was looking for - thanks a lot. Hsin-Ya Peter Dalgaard wrote: > > > > Andrew Robinson wrote: >> In your data, subject is nested within sequence. Was that your >> intention? >> >&g

Re: [R] how to find and use specific column after spliting dataframe

2007-11-28 Thread Hsin-Ya Lee
=x, formulation=y, subject=z, time=t, concentration=c) A.split<-split(df, list(df$pH ,df$formulation, df$subject) ) A.split [] Best regards, Hsin-Ya Lee Henrique Dallazuanna wrote: > > Try this: > > A.split[[1]]["time"] > A.split[[1]][["concentration"

Re: [R] How to catch data from the different dataframes and lm problem?

2007-12-30 Thread Hsin-Ya Lee
gression. For example, I used the “regression” function of Microsoft Excel 2003 and intercept is -0.01894 and X is 0.185758. I think that if I can catch “test” (Y) values and “concentration” (X) values into a dataframe, then I can use “lm” to fit linear models. So, how to catch all “test” values fro

Re: [R] How to catch data from the different dataframes and lm problem?

2007-12-30 Thread Hsin-Ya Lee
o fit linear models. So, how to catch all “test” values from different dataframes? Or what should I do? Best regards, Hsin-Ya Lee -- View this message in context: http://www.nabble.com/How-to-catch-data-from-the-different-dataframes-and-lm-problem--tp14521967p14554872.html Sent from the R help

[R] Heteroscedasticity in a percent-cover dataset

2016-04-15 Thread Lai Wen Ya Samantha
Hi, I am currently trying to do a GLMM on a dataset with percent cover of seagrass (dep. var) and a suite of explanatory variables including algal (AC) and epiphyte cover (EC), rainfall, temperature and sunshine hours. M2=glmer(SG~AC+EC+TP+SS+RF+(1|Location/fSi/fTr), family=binomial,data=data,n