Re: [R] Why do i get "Error: unexpected input in "A<-lm(GandW ~ Authocracy, Data)"

2012-11-23 Thread brunosm
Use "," instead of ";" It should work now... Regards, Bruno -- View this message in context: http://r.789695.n4.nabble.com/Why-do-i-get-Error-unexpected-input-in-A-lm-GandW-Authocracy-Data-tp4650559p4650566.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] ROC Curve: negative AUC

2012-11-23 Thread brunosm
Thanks, Do you know how to correct it? Cheers, Bruno -- View this message in context: http://r.789695.n4.nabble.com/ROC-Curve-negative-AUC-tp4650469p4650530.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] ROC Curve: negative AUC

2012-11-22 Thread brunosm
Hi all, does anyone know why the area under the curve (AUC) is negative? I'm using ROC function with a logistic regression, package Epi. First time it happens... Thanks a lot! Bruno -- View this message in context: http://r.789695.n4.nabble.com/ROC-Curve-negative-AUC-tp4650469.html Sent fr

[R] add1() alternative

2012-11-02 Thread brunosm
Hi, I'm trying to build a hierarchical logistic regression model with lme4 package, but I have a problem on selecting the variables to include in this model. In a simple logistic regression, using Forward selection, i use a likelihood ratio test to check which variables i should include in the mo

Re: [R] Join data frame columns

2012-10-23 Thread brunosm
Hi Ivan, thanks for your help! For example: > df num letters 1 1 A 2 2 B 3 3 C 4 4 D 5 5 E What i want is to join "num" and "letters" in a single column. Something like this > new_df 1 1 2 2 3 3 4 4 5 5 6 A

[R] Join data frame columns

2012-10-23 Thread brunosm
Hi, I have a data frame with 100 variables (numeric and non numeric types), and I want to join them in only one column, like a vector, but i want to keep the non numeric variables like they are. I know that i can do something like this: Suppose that my data is in df variable new_df<-data.frame(

Re: [R] Matrix to data.frame with factors

2012-10-19 Thread brunosm
Obrigado Rui, é isso mesmo ;) -- View this message in context: http://r.789695.n4.nabble.com/Matrix-to-data-frame-with-factors-tp4646730p4646757.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https:

Re: [R] Matrix to data.frame with factors

2012-10-19 Thread brunosm
Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Matrix-to-data-frame-with-factors-tp4646730p4646756.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

[R] Matrix to data.frame with factors

2012-10-19 Thread brunosm
Hi all, I have a matrix with 100 variables: each variable as a value of 0 or 1. What i want to do is convert this matrix to a data.frame but convert all the variables to factors (0 and 1) also. I know i can do this one variable a time but i have 100 variables... Any easy way of doing this?? Th

Re: [R] ifelse reformulation

2012-10-12 Thread brunosm
Hi arun kirshna just let me ask you something else. Imagin that i only want to "search" in the variables x3,x4 and x5. How can i do this? Regards, Bruno -- View this message in context: http://r.789695.n4.nabble.com/ifelse-reformulation-tp4645981p4646013.html Sent from the R help mailing li

Re: [R] ifelse reformulation

2012-10-12 Thread brunosm
That was exacly what i was looking for! Thanks a lot! Cheers! -- View this message in context: http://r.789695.n4.nabble.com/ifelse-reformulation-tp4645981p4645990.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] ifelse reformulation

2012-10-12 Thread brunosm
Hi, i'm trying to simplify some R code but i got stucked in this: test<-data.frame(cbind(id,x1,x2,x3,x4,x5,x6,x7)) test > test id x1 x2 x3 x4 x5 x6 x7 1 1 36 26 21 32 31 27 31 2 2 45 21 46 50 22 36 29 3 3 49 47 35 44 33 31 46 4 4 42 32 38 28 39 45 32 5 5 29 42 39 48 25 35 34 6 6 39