Re: [R] Binary data on JAGS

2021-06-01 Thread Massimiliano Tripoli
Thanks, for suggestions (To define p before). I thought it and I put this line of code inside the loop: p[i] <- y[i] / n[i] but I received a RUNTIME ERROR and: (Attempt to redefine node p[1]). Thanks Massimiliano Il giorno mar 1 giu 2021 alle ore 17:22 Bert Gunter ha scritto: > Where is p defin

Re: [R] Binary data on JAGS

2021-06-01 Thread Bert Gunter
Unless you have got reason not to, always reply to the list (included in this response). I cannot help, but someone else may be able to. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Co

Re: [R] Binary data on JAGS

2021-06-01 Thread Bert Gunter
Where is p defined before it is used? (Is this part of what jags provides somehow?) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Jun 1, 2021 at 7:57 AM

[R] Binary data on JAGS

2021-06-01 Thread Massimiliano Tripoli
Dear R users, I'm trying to reproduce the example 6.5.1 (Dobson (1983)) in BUGS book in linux using JAGS. Below the code as https://www.mrc-bsu.cam.ac.uk/software/bugs/the-bugs-project-the-bugs-book/bugs-book-examples/the-bugs-book-examples-chapter-6-6-5-1/ # By R code: library('rjags') jags <

[R] Binary Number To Two´s Complement Representation

2020-01-20 Thread Paul Bernal
Dear Rui, Based on the rules given in the link below, I want to transform the binary numbers into latitude and longitude coordinates (in degrees and minutes), so that is basically what I am trying to accomplish. The first integer gives the sign (positive or negative) of the number, and the rest n-

Re: [R] Binary Value into Text

2016-06-13 Thread Jeff Newmiller
Please post in plain text format. Only you have the power to format your email the way we will see it... using the default HTML format only leads to odd wraparounds and weird characters that you don't know about when you send but we have to wade through when we recieve it. "Character" data is

Re: [R] Binary Value into Text

2016-06-13 Thread Jim Lemon
Hi Fahman, That error message usually means that there is no newline at the end of the last line of the input file. Try adding a newline, Jim On Tue, Jun 14, 2016 at 1:17 AM, Fahman Khan via R-help wrote: > I have written a following piece of code. >> binaryFile <- file("sampleBinary.dat", 'rb'

[R] Binary Value into Text

2016-06-13 Thread Fahman Khan via R-help
I have written a following piece of code.  > binaryFile <- file("sampleBinary.dat", 'rb')>readBin(binaryFile, character(), > endian="little") I'm getting a warning message that says  Warning message: In readBin(binaryFile, chracter(), endian="little") : incomplete string at end of file has been

[R] Binary Classification / Logistic Regression Models - Metrics

2015-12-23 Thread Manish MAHESHWARI
Hi All, For Binary Classification / Logistic Regression Models, Is there a specific preference or standard of what metric to be used for comparison of 2 models, especially when the model types are different - e.g logistic regression vs svd vs gbm vs neural networks? As I understand AUC is the

Re: [R] binary to R object

2014-07-30 Thread Ramiro Barrantes
rawConnection did it!! Thank you very much!!! From: Prof Brian Ripley [rip...@stats.ox.ac.uk] Sent: Wednesday, July 30, 2014 4:14 PM To: Ramiro Barrantes; r-help@r-project.org Subject: Re: [R] binary to R object What type actually is 'binary'

Re: [R] binary to R object

2014-07-30 Thread Prof Brian Ripley
What type actually is 'binary' here? We cannot tell, as writeBin will handle many types. If 'binary' means a raw vector, two ways: 1) Use load() on a raw connection (see ?rawConnection). 2) Make use of the information in ?readRDS. You can read the header from save() format by skipping the f

[R] binary to R object

2014-07-30 Thread Ramiro Barrantes
Hello, I have stored R objects as hexadecimals in a mysql database, I then usually transform them to binary and then save it into a file. E.g. hex <- getBlob #gets blob from database as hexadecimal binary <- transformToBinary(hex) #moves from hex to binary I would usually save them into

Re: [R] binary symmetric matrix combination

2013-12-18 Thread arun
Hi, You could try: Either: dat1 <- read.table("Test.txt",header=TRUE) dim(dat1) #[1] 4735 4735 dat2 <- read.table("1991res.txt",header=TRUE) dim(dat2) #[1] 574 574 m1 <- as.matrix(dat1) m2 <- as.matrix(dat2) library(data.table) d1 <- data.table(Name1=as.vector(outer(rownames(m1),colnames(m1),past

Re: [R] binary symmetric matrix combination

2013-09-21 Thread arun
Hi Elio, Use ?write.table() write.table(res,"Eliores.txt",quote=FALSE) #and as read the file mat1<- as.matrix(read.table("Eliores.txt",header=TRUE)) #or even this should work mat1<-  as.matrix(read.table("Eliores.txt")) #If you have very big matrix, you may try: library(tseries) write(res,"Elior

Re: [R] binary symmetric matrix combination

2013-09-20 Thread supernovartis
Hi Arun, I get the following error when I enter the command: library(reshape2) Error in library(reshape2) : there is no package called ‘reshape2’ Any ideas? Thanks again. On Fri, Sep 20, 2013 at 3:09 PM, arun kirshna [via R] < ml-node+s789695n4676569...@n4.nabble.com> wrote: > Hi Eli

Re: [R] binary symmetric matrix combination

2013-09-20 Thread arun
Hi Elio, Try this: library(stringr) lines1<-str_trim(gsub("\t"," ",readLines("elio.txt")))  lst1<-lapply(split(lines1,cumsum(lines1=="")),function(x) x[x!=""]) lst2<- lapply(lst1[lapply(lst1,length)>0],function(x) as.matrix(read.table(text=x,row.names=1))) names(lst2)<- paste0("m",seq_along(lst

Re: [R] binary symmetric matrix combination

2013-09-19 Thread supernovartis
Hi Arun, Worked perfectly, one last question how to read the matrices which have the dollar sign? Thanks again. On Thu, Sep 19, 2013 at 3:46 PM, arun kirshna [via R] < ml-node+s789695n4676510...@n4.nabble.com> wrote: > Hi Elio, > Try this: > library(stringr) > lines1<-str_trim(gsub("\t"," ",r

Re: [R] binary symmetric matrix combination

2013-09-19 Thread arun
Hi Elio, Try this: library(stringr)  lines1<-str_trim(gsub("\t"," ",readLines("elio.txt")))  lst1<-lapply(split(lines1,cumsum(lines2=="")),function(x) x[x!=""]) lst2<- lapply(lst1[lapply(lst1,length)>0],function(x) as.matrix(read.table(text=x,row.names=1))) names(lst2)<- paste0("m",seq_along(lst2

Re: [R] binary symmetric matrix combination

2013-09-18 Thread supernovartis
Hi, I have another question related to the same problem. I have a text file with about 350 matrices each separated by a blank row. My question is how to make R believe each matrix is separate and has a specific name m1, m2,m350. Below is an example: aa5 aa10 b253 b254 aa5 0 1 1 1 aa10 1 0

Re: [R] binary symmetric matrix combination

2013-09-18 Thread arun
Hi Elio, Try this: Assuming that there is a single blank row separating the matrices: lines1<- readLines(textConnection("aa5     aa10     b253     b254 aa5     0     1     1     1 aa10     1     0     1     1 b253     1     1     0     1 b254     1     1     1     0     aa5     aa9     b27    

Re: [R] binary symmetric matrix combination

2013-09-06 Thread arun
HI, No problem.  Suppose you have many matrices and you want to sum up the repeated variables, may be this helps: #Creating one more matrix which has some repeated variables. m6<- as.matrix(read.table(text="y1 e5 s2  y1 0 1 1  e5 1 0 1  s2 1 1 0",sep="",header=TRUE)) #m1:m5 same as previous dat

Re: [R] binary symmetric matrix combination

2013-09-05 Thread arun
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17  y1 0 1 1 1  c1 1 0 1 1  c2 1 1 0 1  l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4    s2 s30  y1 0 1 1 1  h4 1 0 1 1  s2 1

Re: [R] binary symmetric matrix combination

2013-09-05 Thread arun
HI, No problem. I think you didn't run the `vecOut` after adding the new matrix.  `lst1` is based on `vecOut` For example: m5<- as.matrix(read.table(text="y1 e6 l16  y1 0 1 1 e6 1 0 1 l16 1 1 0",sep="",header=TRUE)) names1<-unique(c(colnames(m1),colnames(m2),colnames(m3),colnames(m4), colnames(m5

Re: [R] binary symmetric matrix combination

2013-09-05 Thread arun
Also, some of the steps could be reduced by: names1<-unique(c(colnames(m1),colnames(m2),colnames(m3),colnames(m4))) Out3<-matrix(0,length(names1),length(names1),dimnames=list(names1,names1)) lst1<-sapply(paste0("m",1:4),function(x) {x1<- get(x); x2<-paste0(colnames(x1)[col(x1)],rownames(x1)[row(x

Re: [R] binary distance measure of the "dist" function in the "stats" package

2013-07-18 Thread David Carlson
9:56 AM To: r-help@r-project.org Subject: [R] binary distance measure of the "dist" function in the "stats" package Dear all: I want to ask question about "binary" distance measure. As far as I know, there are many binary distance measures,eg, binary Jarcad distan

[R] binary distance measure of the "dist" function in the "stats" package

2013-07-18 Thread 朱林
Dear all: I want to ask question about "binary" distance measure. As far as I know, there are many binary distance measures,eg, binary Jarcad distance, binary euclidean distance, and binary Bray-Curtis distance,etc. It is even more confusing because many have more than one name. So , I wan to k

Re: [R] BINARY traits GENETIC CORRELATION

2013-06-20 Thread Jeff Newmiller
Re-posting, particularly without referencing your earlier post, is bad mailing-list etiquette. Posting in HTML is particularly frowned upon here also. Nor is this a statistical methods support forum... it is about R. I for one am finding your question very jargonish and obscure. If your question

[R] BINARY traits GENETIC CORRELATION

2013-06-20 Thread Vallejo, Roger
Dear R Users, I have always used ASReml, MTDFREML, SAS, etc. to estimate genetic correlation (Rg) between two continuous quantitative traits (also continuous and binary trait) but I have never used R package to estimate Rg. However, I use R package for many of my other statistical analysis needs

[R] BINARY traits GENETIC CORRELATION

2013-06-20 Thread Vallejo, Roger
Dear R Users, I have always used ASReml, MTDFREML, SAS, etc. to estimate genetic correlation (Rg) between two continuous quantitative traits (also continuous and binary trait) but never used R to estimate Rg. However, I use R for many of my other statistical analysis needs; the R package is a gr

Re: [R] binary data

2012-09-04 Thread David L Carlson
or of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Juan Fernández Tajes > Sent: Tuesday, September 04, 2012 3:19 AM > To: r-help@r-project.org &g

[R] binary data

2012-09-04 Thread Juan Fernández Tajes
Dear list, Hello to everybody, I´m interested in finding a package for statistical analysis of binary data, I have a matrix with the following structure: Case1 Case2 Case 3 ... CaseX Control1 Control2 Control3 ... ControlY Pep1 1 0 1 1 0 0 0 1 Pep2 1 1 1 1 1 0 0 1 Pep3 0 1 1 1 1 0

[R] Binary Quadratic Opt

2012-08-02 Thread khris
Hi Bert, I won't post any more messages on this thread as problem has shifted from Optimization in R to Graph Algorithms. Rest fine Khris. On Aug 2, 2012, at 9:13 PM, Bert Gunter [via R] wrote: > This discussion needs to be taken off (this) list, as it appears to > have nothing to do with R.

Re: [R] Binary Quadratic Opt?

2012-08-02 Thread khris
Thanks for the response Petr On Aug 2, 2012, at 11:11 PM, Petr Savicky [via R] wrote: > On Thu, Aug 02, 2012 at 02:27:43AM -0700, khris wrote: > > > > > On Aug 2, 2012, at 12:39 PM, Petr Savicky [via R] wrote: > > > > > On Wed, Aug 01, 2012 at 04:55:30AM -0700, khris wrote: > > > > Hi Petr,

Re: [R] Binary Quadratic Opt?

2012-08-02 Thread Petr Savicky
On Thu, Aug 02, 2012 at 02:27:43AM -0700, khris wrote: > > On Aug 2, 2012, at 12:39 PM, Petr Savicky [via R] wrote: > > > On Wed, Aug 01, 2012 at 04:55:30AM -0700, khris wrote: > > > Hi Petr, > > > > > > It been sometime since I wrote. But here are the latest developments. > > > > > > When I

Re: [R] Binary Quadratic Opt?

2012-08-02 Thread Bert Gunter
This discussion needs to be taken off (this) list, as it appears to have nothing to do with R. -- Bert On Thu, Aug 2, 2012 at 2:27 AM, khris wrote: > > On Aug 2, 2012, at 12:39 PM, Petr Savicky [via R] wrote: > >> On Wed, Aug 01, 2012 at 04:55:30AM -0700, khris wrote: >> > Hi Petr, >> > >> > It

Re: [R] Binary Quadratic Opt?

2012-08-02 Thread khris
On Aug 2, 2012, at 12:39 PM, Petr Savicky [via R] wrote: > On Wed, Aug 01, 2012 at 04:55:30AM -0700, khris wrote: > > Hi Petr, > > > > It been sometime since I wrote. But here are the latest developments. > > > > When I give the binary linear opt problem to lpSolve optimizer than for > > sm

Re: [R] Binary Quadratic Opt?

2012-08-02 Thread Petr Savicky
On Wed, Aug 01, 2012 at 04:55:30AM -0700, khris wrote: > Hi Petr, > > It been sometime since I wrote. But here are the latest developments. > > When I give the binary linear opt problem to lpSolve optimizer than for small > instance it gives correct answer but when size of nodes increase let's

Re: [R] Binary Quadratic Opt?

2012-08-01 Thread khris
Hi Petr, It been sometime since I wrote. But here are the latest developments. When I give the binary linear opt problem to lpSolve optimizer than for small instance it gives correct answer but when size of nodes increase let's say 16 then there are about 2000 binary variables and lpSolve just

Re: [R] Binary Quadratic Opt?

2012-07-05 Thread khris
Thanks Petr for the reply. Let me do implementation and see how how goes. Enjoy your vacation. Rest fine Khris On Jul 4, 2012, at 8:25 PM, Petr Savicky [via R] wrote: > On Mon, Jul 02, 2012 at 06:11:37AM -0700, khris wrote: > > > Hi, Petr, > > > > > > > > Hi Khris: > > > > > > If i unders

Re: [R] Binary Quadratic Opt?

2012-07-04 Thread Petr Savicky
On Mon, Jul 02, 2012 at 06:11:37AM -0700, khris wrote: > Hi, Petr, > > > > > Hi Khris: > > > > If i understand the problem correctly, you have a list of (x,y) > > coordinates, where > > some sensor is located, but you do not know, which sensor is there. The > > database > > contains data fo

Re: [R] Binary Quadratic Opt?

2012-07-02 Thread khris
Hi, Petr, > > Hi Khris: > > If i understand the problem correctly, you have a list of (x,y) coordinates, > where > some sensor is located, but you do not know, which sensor is there. The > database > contains data for each sensor identified in some way, but you do not know the > mapping be

Re: [R] binary tree

2012-07-02 Thread Robert Baer
On 6/27/2012 3:20 AM, Peppino wrote: Hi I am new with R I Have to build a binary tree with R. I'm very confused was wondering if anyone had any R sample code they would share. Any bady can help me? You might want to look at the R Task view for phylogenetics: http://cran.r-project.org/web/views

Re: [R] Binary Quadratic Opt?

2012-07-02 Thread khris
Hi Menkes, Thanks for the reply but just academically free license won't work for me. GNU or more is reqd. Rest fine Khris. On Jun 30, 2012, at 7:21 PM, menkes [via R] wrote: > Hi Khris, > > If all your variables are binary then you may want to check CPLEX and/or > Gurobi (both provide a

Re: [R] Binary Quadratic Opt?

2012-06-30 Thread menkes
Hi Khris, If all your variables are binary then you may want to check CPLEX and/or Gurobi (both provide a free academic license). http://www-01.ibm.com/software/integration/optimization/cplex-optimizer/ http://www.gurobi.com/products/additional-products-using-gurobi/r The algorithms that CPLEX a

Re: [R] Binary Quadratic Opt?

2012-06-28 Thread Petr Savicky
On Tue, Jun 26, 2012 at 11:52:15PM -0700, khris wrote: > Hi Petr, > > Appreciate your feedback and sorry for the delay in responding. The > following is the description of problem from start:- > > We have a set of sensors in XY plane arranged in more or less a rectangular > grid and we know thei

[R] binary tree

2012-06-27 Thread Peppino
Hi I am new with R I Have to build a binary tree with R. I'm very confused was wondering if anyone had any R sample code they would share. Any bady can help me? Bye Giuseppe -- View this message in context: http://r.789695.n4.nabble.com/binary-tree-tp4634593.html Sent from the R help mailin

Re: [R] Binary Quadratic Opt?

2012-06-27 Thread khris
Hi Petr, Appreciate your feedback and sorry for the delay in responding. The following is the description of problem from start:- We have a set of sensors in XY plane arranged in more or less a rectangular grid and we know their (x,y) co-ordinate. Now these sensors send data and from that data

Re: [R] Binary Quadratic Opt?

2012-06-21 Thread Petr Savicky
On Thu, Jun 21, 2012 at 02:46:10AM -0700, khris wrote: > Hi Petr, > > Thanks for the reply. Your reply answers the question perfect. > Unfortunately converting the problem to linear opt would increase the number > of variable making it non solvable. I guess a general approach will be > unfeasible

Re: [R] Binary Quadratic Opt?

2012-06-21 Thread khris
Hi Petr, Thanks for the reply. Your reply answers the question perfect. Unfortunately converting the problem to linear opt would increase the number of variable making it non solvable. I guess a general approach will be unfeasible so need to look for specific approach. Appreciate if you have any

Re: [R] binary operators that never return missing values

2012-06-20 Thread David Winsemius
On Jun 20, 2012, at 5:18 PM, Anthony Damico wrote: Thanks Michael, I was hoping to complete this in one step (since I use these a lot). Setting the class of the vectors seems like more typing than just doing %>F% ... Unfortunately, my knowledge of classes, methods, and the like is pretty sha

Re: [R] binary operators that never return missing values

2012-06-20 Thread Duncan Murdoch
On 12-06-20 4:44 PM, Anthony Damico wrote: Hi, I work with data sets with lots of missing values. We often need to conduct logical tests on numeric vectors containing missing values. I've searched around for material and conversations on this topic, but I'm having a hard time finding anything.

Re: [R] binary operators that never return missing values

2012-06-20 Thread Rui Barradas
Hello, again. I have two apologies, to the list for having forgotten to cc my previous reply to this thread, and to you for not having understood that you wanted it solved in one step. My solution would need two steps. Now revised. no.na <- function(x, value=FALSE){x[is.na(x)] <- value; x}

Re: [R] binary operators that never return missing values

2012-06-20 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Anthony Damico > Sent: Wednesday, June 20, 2012 2:19 PM > To: R. Michael Weylandt > Cc: r-help@r-project.org > Subject: Re: [R] binary operators th

Re: [R] binary operators that never return missing values

2012-06-20 Thread R. Michael Weylandt
On Wed, Jun 20, 2012 at 4:18 PM, Anthony Damico wrote: > Thanks Michael, > > I was hoping to complete this in one step (since I use these a lot). > Setting the class of the vectors seems like more typing than just > doing %>F%  ... Hmmm. my way save you 3 characters (and three shifts!) per co

Re: [R] binary operators that never return missing values

2012-06-20 Thread Anthony Damico
Thanks Michael, I was hoping to complete this in one step (since I use these a lot). Setting the class of the vectors seems like more typing than just doing %>F% ... Unfortunately, my knowledge of classes, methods, and the like is pretty shaky. Is it possible to *create* another set of operator

Re: [R] binary operators that never return missing values

2012-06-20 Thread R. Michael Weylandt
Hi Anthony, No, I don't believe this exists on CRAN already (happy to be proven wrong though) but I might suggest you approach things a different way: instead of defining this operator by operator with infix notation, why not go after `+`, `>` directly? If you put a class on your vectors, you can

Re: [R] binary operators that never return missing values

2012-06-20 Thread John Kane
I'm not sure I got the question but is this something like what you want? x[is.na(x) ] <- "FALSE" x John Kane Kingston ON Canada > -Original Message- > From: ajdam...@gmail.com > Sent: Wed, 20 Jun 2012 16:44:25 -0400 > To: r-help@r-project.org &

[R] binary operators that never return missing values

2012-06-20 Thread Anthony Damico
Hi, I work with data sets with lots of missing values. We often need to conduct logical tests on numeric vectors containing missing values. I've searched around for material and conversations on this topic, but I'm having a hard time finding anything. Has anyone written a package that deals with

Re: [R] Binary Quadratic Opt?

2012-06-15 Thread Petr Savicky
On Fri, Jun 15, 2012 at 05:17:36PM +0530, Anup Bhatkar wrote: > Hello, > > I have to solve Binary Quadratic Optimization problem i.e the objective > function is quadratic, constraints are linear and variable are binary. I > checked the "quadprog" package but it does not seem to be right choice f

[R] Binary Quadratic Opt?

2012-06-15 Thread Anup Bhatkar
Hello, I have to solve Binary Quadratic Optimization problem i.e the objective function is quadratic, constraints are linear and variable are binary. I checked the "quadprog" package but it does not seem to be right choice for the problem. Can any one suggest what would be the best package to

[R] Binary logistic regression with binary predictors

2012-05-02 Thread F.j. Berg
Ey R-people Trying to do a binary logistic regression with only categorical(age,ballot) and binary predictors for a binary response variable. I can model them at least at least i treat the binary predictors as categorical with the use of as.factor(etc) and use glm with binomial distribution

[R] Binary ARMA

2011-11-14 Thread Napon H.
http://r.789695.n4.nabble.com/file/n4040429/model.jpg Hi All I need some help about construct MLE logit for Binary Autogressive Moving Average model. Please see the model in the PDF attach file. This is what i did. y<-c(0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1) # y is

Re: [R] Binary optimization problem in R

2011-09-21 Thread Hans W Borchers
Michael Haenlein escpeurope.eu> writes: > Dear all, > > I would like to solve a problem similar to a multiple knapsack problem and > am looking for a function in R that can help me. > > Specifically, my situation is as follows: I have a list of n items which I > would like to allocate to m grou

[R] Binary optimization problem in R

2011-09-19 Thread Michael Haenlein
Dear all, I would like to solve a problem similar to a multiple knapsack problem and am looking for a function in R that can help me. Specifically, my situation is as follows: I have a list of n items which I would like to allocate to m groups with fixed size. Each item has a certain profit v

Re: [R] binary conversion list to data.frame with plyr... AND NO LOOPS!

2011-07-08 Thread jim holtman
try this: > x <- c(36, 40, 10, 4) > x.m <- matrix(as.integer(intToBits(x)), byrow = TRUE, ncol = 32)[, 1:20] > x.m <- data.frame(x.m) # convert to data.frame > x.m X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0

[R] binary conversion list to data.frame with plyr... AND NO LOOPS!

2011-07-08 Thread Justin Haynes
Happy weekend helpeRs! As usual, I'm stumped by R... My plan was to take an integer number, convert it to binary and wind up with a data.frame where each column is either 1 or 0 so I can see which bits are changing: bb<-function(i) ifelse(i, paste(bb(i %/% 2), i %% 2, sep=""), "") my.dat<-c(36,4

Re: [R] binary in R

2011-06-22 Thread Sarah Goslee
Jürg. It's not that nobody knows the answer, necessarily, it's that your inquiry is so vague we don't know what the *question* is, let alone the answer. We don't know anything about your data, your intended function and model, anything. A toy reproducible example with clear explanation would be

[R] binary in R

2011-06-22 Thread Jürg Altwegg
Does really nobody has a coment to this question? Dear R-help members I would like to use the R package goalprog, weighted and lexicographical goal programming and optimization to optimize a location problem. In my model I need a "yes" or "no" decision - in this case, whether to select a site

[R] binary goal programming in R

2011-06-21 Thread Jürg Altwegg
Dear R-help members I would like to use the R package goalprog, weighted and lexicographical goal programming and optimization to optimize a location problem. In my model I need a "yes" or "no" decision - in this case, whether to select a site or not - are represented by 1 and 0. Does somebody

Re: [R] Binary response GLM Question

2011-06-04 Thread casperyc
Hi Josh, Thank you for your reply. The reason I thank "Y" (0 and 1) here as p is because I think each observation is just a bernulli trial, so in this case the binomial n=1. And yet R still fits it (with the logit link) . I know the expression for the logit link, so I assumed I can take y here as

Re: [R] Binary response GLM Question

2011-06-04 Thread Joshua Wiley
Hi, Y is not the same as P. P is the conditional probability given the data matrix. So theoretically, P can take on any value in [0, 1], which means the odds can be anywhere from [0, +infty], not just 0 or undefined. In logistic regression, the logit link is pretty standard, so I do not think y

[R] Binary response GLM Question

2011-06-04 Thread casperyc
Hi all, I have a problem with binary response data in GLM fitting. The problem is that the "y" take only 1 or 0, and if I use logit link, it is the log of the odds ratio, which is p/(1-p). In my situation, think "y" is "p", so sometimes the odds is 0, sometimes it is "1/0", which is (should be) un

Re: [R] binary exogenous variable in path analysis in sem or lavaan

2011-03-24 Thread yrosseel
Rob, If 'sex' is indeed an exogenous variable (ie. predictor only), you can simply code it as (1=male, 2=female) and use it as a covariate in any sem model. In lavaan, you can explicitly use the argument 'fixed.x=TRUE', which will regard all exogenous covariates as fixed variables. Their means/var

[R] binary data with correlation

2011-03-21 Thread yvonne fabian
Dear posters, I have a question concerning binary data analysis. I have presence absence data of 5 sampling sessions within 3 years, of 12 fields. Each field had 12 traps. I would like to analyse the data with a Generalized Estimating Equations (GEE) Model in R. For the abundance data I used a gls

[R] binary exogenous variable in path analysis in sem or lavaan

2011-03-15 Thread Rob Knell
Hello all I'm trying to run some path analysis in either sem or lavaan (preferably lavaan because I find its interface easier to use). Most of my variables are continuously distributed and fairly well-behaved but I have a single exogenous variable (sex) which is not continuously distributed. Pr

Re: [R] binary tree construction in R

2010-10-06 Thread Norm Matloff
On Tue, Oct 05, 2010 at 06:13:04PM -0400, Mike Marchywka wrote: > I guess it wouldn't be too far a field to discuss benefits > of data stucture exploration in R vs cpp or java- Especially > for something like this where you may want to time it in a multithreaded > setting- you can always instrume

Re: [R] binary tree construction in R

2010-10-05 Thread Mike Marchywka
inary_tree > From: marchy...@hotmail.com > To: matl...@cs.ucdavis.edu; r-help@r-project.org > > Date: Tue, 5 Oct 2010 14:57:40 -0700 > > From: matl...@cs.ucdavis.edu > > To: r-help@r-project.org > > Subject: Re: [R] binary tree

Re: [R] binary tree construction in R

2010-10-05 Thread Mike Marchywka
> Date: Tue, 5 Oct 2010 14:57:40 -0700 > From: matl...@cs.ucdavis.edu > To: r-help@r-project.org > Subject: Re: [R] binary tree construction in R > > MK wrote: > > > Hi all, > > > > I'm very new to R a

Re: [R] binary tree construction in R

2010-10-05 Thread Norm Matloff
MK wrote: > Hi all, > > I'm very new to R and I'm trying to construct a threaded binary tree using > recursive functions. > > I'm very confused was wondering if anyone had any R sample code they would > share. I've come across a lot of C++ code(nothing in R) and this is not > helping. > > best,

[R] binary tree construction in R

2010-10-04 Thread kateg
Hi all, I'm very new to R and I'm trying to construct a threaded binary tree using recursive functions. I'm very confused was wondering if anyone had any R sample code they would share. I've come across a lot of C++ code(nothing in R) and this is not helping. best, MK -- View this message

Re: [R] binary package build error:target 'xf->>' is not a directory

2010-09-15 Thread Uwe Ligges
You have to build a *source* package under Linux in order to install it under Windows afterwards. A Linux binary package cannot be used under Windows. Best, Uwe Ligges On 31.08.2010 09:59, raje...@cse.iitm.ac.in wrote: Hi, I built a package in linux and generated its binary using R CM

[R] binary package build error:target 'xf->>' is not a directory

2010-08-31 Thread raje...@cse.iitm.ac.in
Hi, I built a package in linux and generated its binary using R CMD build --binary testpack. This generated testpack.tar.gz. I tried to install this package in windows using R CMD INSTALL package.tar.gz and I got the error *installing to library 'H:/R-2.11.1/library' *installing *bina

Re: [R] binary logistic regression taking account clustering

2010-05-01 Thread David Freedman
The bootcov function for models fit using lrm in the rms package might also be an option hth -- View this message in context: http://r.789695.n4.nabble.com/binary-logistic-regression-taking-account-clustering-tp2122255p2122311.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] binary logistic regression taking account clustering

2010-05-01 Thread Thomas Stewart
See help(lmer, package="lme4") for a mixed-effects model approach. See help(geeglm, package="geepack") for a GEE approach. -tgs On Sat, May 1, 2010 at 1:52 PM, kende jan wrote: > Hello > > I would like to perform with R, a binary logistic regression analysis > taking account clustering >

[R] binary logistic regression taking account clustering

2010-05-01 Thread kende jan
Hello I would like to perform with R, a binary logistic regression analysis taking account clustering (A randomized trial into 2 groups, patients within 50 hospitals): y (0,1) is the outcome x1, x2 indivifdual’s characteristics x3,x4 hospitals’ characteristics. Thanks in advance Jan

[R] binary response: from p_hat to 0, 1

2010-03-15 Thread noclue_
I am using PROC LOGISTIC to model binary outcomes. I have observed Y (1 or 0) from original data. I also have got predicted probability for each observation (i.e. predicted probability of event Y=1) from PROC LOGISTIC. Let us call it - p_hat. for example, I would have two columns - Y p_hat

Re: [R] binary

2010-01-25 Thread Peter Ehlers
Val wrote: Hi all Assume I have a data set xx; Group: 1=group1 , 2=group2 IQ: 1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results Estimate Std. Error z value Pr(>|z|) (Intercept) -2.554560.210 -12.273 < 5e-16 *** group

Re: [R] binary

2010-01-25 Thread Val
Thanks for your response. Do you mean that both the log-odds and odd ratio have the same meaning? My question is that the log-odd estimate 0.3618 is it for group1 or group2? normally 1vs2, glm takes 2 as reference, in the group1 the IQ increase by 0.3618compared to group 2 What does

Re: [R] binary

2010-01-25 Thread Mohamed Lajnef
Hi val, Val a écrit : Hi all Assume I have a data set xx; Group: 1=group1 , 2=group2 IQ: 1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results Estimate Std. Error z value Pr(>|z|) (Intercept) -2.554560.210 -12.273 < 5e-16 **

[R] binary

2010-01-25 Thread Val
Hi all Assume I have a data set xx; Group: 1=group1  , 2=group2 IQ:  1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results    Estimate Std. Error z value Pr(>|z|) (Intercept) -2.55456    0.210 -12.273  < 5e-16 *** group  0.36180

[R] Binary operators in packages and documentation?

2009-11-25 Thread Zhou Fang
Hi, I'm trying to make a package defining a new (S3?) class. Part of this involves a custom version of a binary operator. e.g. "*.foo", so I can do obj.foo * bar, or things like that. Now, I think to makes this work with a NAMESPACE, I can do S3method("*", foo) in the NAMESPACE file, right? The

Re: [R] binary data

2009-11-25 Thread Gnanasivam
karuna m wrote: > > hi, > I am trying to calculate distance matrices for binary data frame. I am > using dist.binary in 'ade4' package. This is the code i run and get error > message as 'missing value where True/False needed: > clss <- as.data.frame(cls) > dist.binary(clss, method = 1, diag = F

[R] binary data

2009-11-12 Thread karuna m
hi, I am trying to calculate distance matrices for binary data frame. I am using dist.binary in 'ade4' package. This is the code i run and get error message as 'missing value where True/False needed: clss <- as.data.frame(cls) dist.binary(clss, method = 1, diag = FALSE, upper = FALSE) Also, if i

Re: [R] Binary packages on R-forge (was reference on contr.helmert and typo on its help page.)

2009-11-10 Thread Prof Brian Ripley
On Tue, 10 Nov 2009, Gavin Simpson wrote: On Mon, 2009-11-09 at 19:31 -0600, Peng Yu wrote: On Sun, Nov 8, 2009 at 7:32 PM, John Fox wrote: Dear Peng, I'm tempted to try to get an entry in the fortunes package but will instead try to answer your questions directly: I can not install 'fortu

[R] binary quantile regression with IV

2009-09-28 Thread KWAKSUNGIL
Hello, I was wondering if anyonw knows any reference or package about binary quantile regression with IV. I know that Kordas post "S-plus" package in his website. But I don't have S-plus. Furthermore, my friends told mw that his package is not recognized by S-plus 8. Hence, I

Re: [R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Steven Rytina
- Original Message - From: "Peter Dalgaard" To: "Steven Rytina, Prof." Cc: Sent: Sunday, August 09, 2009 6:35 AM Subject: Re: [R] binary operators that implement row and column sweeps of matrices by vectors Steven Rytina wrote: Submitted

Re: [R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Peter Dalgaard
Steven Rytina wrote: Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector

[R] binary operators that implement row and column sweeps of matrices by vectors

2009-08-09 Thread Steven Rytina
Submitted for perusal, comment, improvements, and/or critique. The presentation is in 3 sections: motivation, code, and comment. Motivation: As a new-comer to R from matrix oriented Gauss and Mata, I miss the tools for using a vector (and operator) to ‘sweep

[R] binary digit

2009-07-24 Thread Угодай n/a
Does R has package for providing work for binary digit: arithmetic operation, convert to/from decimal digit, etc? I not found it, but think that CRAN contain it. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://

Re: [R] binary version of R 2.8.x

2009-04-08 Thread stephen sefick
;s my first attempt to > build it myself, and I have downloaded the binaries and installed it > previously. > > > --- On Wed, 4/8/09, stephen sefick wrote: > >> From: stephen sefick >> Subject: Re: [R] binary version of R 2.8.x >> To: tomkur2006-takeh...@y

  1   2   >