Re: [R] xYplot error

2010-07-27 Thread Kang Min
Hi Frank, Thanks for the suggestion. using numericScale() does work for Dotplot, but there're still a few issues: 1. My factor names are Plot A, PF, MSF, and YSF, so numericScale turns that into 3, 2, 1, 4 and the x-axis is plotted 1, 2, 3, 4. Is there any way I can retain the same order on the g

Re: [R] hatching posibility in Panel.Polygon

2010-07-27 Thread baptiste auguie
Hi, library(gridExtra) example(patternGrob) provides some patterns to fill a rectangular area using Grid graphics. It could in theory be used in lattice. I wouldn't use it either, but I can imagine how it might be useful on very special occasions. Best, baptiste On 28 July 2010 06:11, HC

[R] ddply error

2010-07-27 Thread jd6688
ddply(z, .(groupId,location),function(d)with(d, c(startLoc=Pos[1],endLoc=Pos[length(Pos)], peakValue=max(sumoo),other=map[1]))) startLoc=Pos[1],endLoc=Pos[length(Pos)], peakValue=max(sumoo),numeric value other=map[1]===charactor value as a result: c(startLoc=Pos[1],endLoc=Pos[length(Pos)]

Re: [R] Column mapping

2010-07-27 Thread Stefan Grosse
Am 28.07.2010 07:36, schrieb jd6688: > > DF1 > name OTHER > ABCO > KKKO > QQQO > DDDO > PPPO > > DF2 > name > ABC > KKK > DDD > > If the names in df1 mapped the names in df2, then add the mapped name to df1 > as a separate column, for instance "mappedColumn" What do you

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
this is very insightful. sounds exactly like what I want to do. thanks. Frank. -- View this message in context: http://r.789695.n4.nabble.com/how-to-generate-a-random-data-from-a-empirical-distribition-tp2302716p2304346.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
good point. It seems to be important to investigate the nature of distribution. I might be too naive to assume that a "empirical probability distribution" would be automatically generated from a cloud of data points. -- View this message in context: http://r.789695.n4.nabble.com/how-to-gener

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread xin wei
hi, Dennis: points well taken. it seems to be important to investigate the nature of distribution. I may be too naive to assume a "empirical probability distribution" would be computed from a could of data points -- View this message in context: http://r.789695.n4.nabble.com/how-to-generate-

[R] Using jpeg() without X

2010-07-27 Thread mic
When I tried this, I'm having this error. Can somebody help me on this. Are there any alternatives or workaround for this? I'm having hard time to convince our admin to install X11 library and headers since they are not included on the default OS installation. Thanks in advance :) > jpeg("test.jp

Re: [R] Tinn-R related problem

2010-07-27 Thread ForestStats
Hello, I too am having this problem. Some two minutes ago all was well then all of a sudden I cannot backspace or delete or use arrows etc.. -- View this message in context: http://r.789695.n4.nabble.com/Tinn-R-related-problem-tp2075686p2304265.html Sent from the R help mailing list archive at

[R] Column mapping

2010-07-27 Thread jd6688
DF1 nameOTHER ABC O KKK O QQQ O DDD O PPP O DF2 name ABC KKK DDD If the names in df1 mapped the names in df2, then add the mapped name to df1 as a separate column, for instance "mappedColumn" how to implement this? Thanks -- View this message in context: http

[R] sqldf 0.3-5 package or tcltk problem

2010-07-27 Thread ericksonsm
This is my first post. I am running Mac OS X version 10.6.3. I am running R 2.11.0 GUI 1.33 64 bit. This may or may not be related to sqldf, but I experienced this problem while attempting to use an sqldf query. The same code runs with no problem on my Windows machine. Here is what happens

Re: [R] R CMD build wiped my computer

2010-07-27 Thread Jarrod Hadfield
Hi, Thanks for your responses. Although a wrist slapping for not keeping updated with R/Fedora may be warranted, I find it quite terrifying that by simply having a version number in a directory name R went on to try and erase everything on the computer! Thank god I wasn't logged in as ro

Re: [R] specifying an unbalanced mixed-effects model for anova

2010-07-27 Thread Murat Tasan
to be more clear, i'm particularly interested in trying to determine the effect of "Class" on "Score1", while controlling for the effect "Score2" has on "Score1" (and "Score2" is correlated with "Class" (where "Class" is an ordered variable with exactly 4 distinct levels)). i can perform an ANOVA o

Re: [R] specifying an unbalanced mixed-effects model for anova

2010-07-27 Thread Bert Gunter
You are confused. You have not specified a "grouping" random effect, so this is not a mixed effect model as it stands. If this is a homework problem, ask a teacher or classmate for help. Otherwise, try consulting your local statistician. You do not appear to understand the concepts of mixed effec

Re: [R] hatching posibility in Panel.Polygon

2010-07-27 Thread HC
Thank you for your follow up on this matter. I did think about the "partial transparent color" option and will certainly use it and see how it works out. For presentations and color prints, the partial transparency is surely going to work and may even look nicer. But for black and white printing

Re: [R] re-sampling of large sacle data

2010-07-27 Thread jd6688
d <- apply(s, 2, sample, size = 1*nrow(s), replace = TRUE) why the code above return the following error Error: cannot allocate vector of size 218.8 Mb -- View this message in context: http://r.789695.n4.nabble.com/re-sampling-of-large-sacle-data-tp2304165p2304413.html Sent from the R he

Re: [R] Can I create an European map using the map function in R

2010-07-27 Thread Ray Brownrigg
On Tue, 27 Jul 2010, Maomao Luo wrote: > Hi, > > I am trying to create a spatial weight matrix based on the neighboring > relationship among Europan countries. Can I use the map function in R to > generate a European map and then use this map to build the w weight matrix? > So far, I cannot creat

[R] specifying an unbalanced mixed-effects model for anova

2010-07-27 Thread Murat Tasan
hi all - i'm having trouble using lme to specify a mixed effects model. i'm pretty sure this is quite easy for the experienced anova-er, which i unfortunately am not. i have a data frame with the following columns: col 1 : "Score1" (this is a continuous numeric measure between 0 and 1) col 2 : "Sc

[R] analog complexing

2010-07-27 Thread Stanley Neo
hi r-help have tried looking for a package that has analog complexing algo function. appreciate if someone could guide me to the appropriate package. thanks stan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:/

Re: [R] anderson-darling test

2010-07-27 Thread Dennis Murphy
Hi: I tried the following: library(sos) findFn('Anderson-Darling') found 49 matches; retrieving 3 pages 2 3 It appears that packages nortest and ADGofTest might be good places to start, but you can check out the others for yourself. HTH, Dennis On Tue, Jul 27, 2010 at 6:08 PM, Roslina Zakaria

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread weix1
Dennis: points well taken. It seems to be important to investigate the nature of distribution. I might be too naive to assume a "emiprical probability distribution" will be simply calculated from a clound of data points... -- View this message in context: http://r.789695.n4.nabble.com/how-to

[R] anderson-darling test

2010-07-27 Thread Roslina Zakaria
Hi, I have the binned data (observed and generated from model)  that I would like to test using the anderson-darling goodness of fit test.  But I'm not sure which package in R to use. I tried ad.test(...) but it does not recognise the test by Vito Ricci in FITTING DISTRIBUTIONS WITH R   > ad

Re: [R] xyplot with all columns of a data.frame on a single plot

2010-07-27 Thread Rajarshi Guha
Thanks to everybody for the solutions. On Tue, Jul 27, 2010 at 3:47 AM, Dennis Murphy wrote: > Hi: > > Another approach might be to use the melt() function in package reshape > before creating the plot with xyplot, something along the lines of the > following: > > library(reshape) > mdat <- melt(

Re: [R] repeating rows in R

2010-07-27 Thread Andrew Anglemyer
Thanks! On Tue, Jul 27, 2010 at 4:29 PM, wrote: > Is this the kind of thing you are looking for? > > > dat <- data.frame(x = 1:3, freq = 2:4) > > dat > x freq > 1 12 > 2 23 > 3 34 > > newDat <- dat[rep(rownames(dat), dat$freq), ] > > newDat >x freq > 1 12 > 1.1 12 > 2

Re: [R] Add an arrow to a plot

2010-07-27 Thread Greg Snow
In addition to the arrows function, look at the my.symbols and ms.arrows functions in the TeachingDemos package, this is a wrapper around the arrows function, but may be a more natural interface for what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Greg Snow
If they want to generate directly from the empirical distribution, then sampling with replacement is the best choice (others had already suggested that). But the reference in the original post to the normal and beta distributions suggested to me that the original poster may have wanted a smooth

Re: [R] Right digits of a floating number

2010-07-27 Thread Duncan Murdoch
On 27/07/2010 6:34 PM, vincent.deluard wrote: Hi all, I am dealing with very large numbers but I am only interested in their last digits. 244^244 [1] Inf As far as I can tell, the largest number R can take has 308 digits (1+E308). Is there a way I could see the last digits only of 244^244?

Re: [R] repeating rows in R

2010-07-27 Thread Bill.Venables
Is this the kind of thing you are looking for? > dat <- data.frame(x = 1:3, freq = 2:4) > dat x freq 1 12 2 23 3 34 > newDat <- dat[rep(rownames(dat), dat$freq), ] > newDat x freq 1 12 1.1 12 2 23 2.1 23 2.2 23 3 34 3.1 34 3.2 34 3.3 34 >

[R] repeating rows in R

2010-07-27 Thread Andrew Anglemyer
I'm somewhat a new user and have been trying to figure out how to repeat rows a certain number of time based on a variable. Currently, the number of rows is not reflective of the number of observations. To get the number of observations (n=22 in this case), I have to multiply by the variable NoRe

Re: [R] Add an arrow to a plot

2010-07-27 Thread Bill.Venables
It won't happen automatically unless you make it do so yourself. Fortunately this is not hard. See, ?arrows -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Trying To learn again Sent: Wednesday, 28 July 2010 7:07 AM To: r-hel

Re: [R] Add an arrow to a plot

2010-07-27 Thread Joshua Wiley
Hi, Here are two options. I would colour the last point differently, or make it a different shape rather than using an arrow, but its your choice. x <- 1:10 y <- 1:10 #With an arrow plot(x, y) arrows(x0 = x[length(x)], y0 = y[length(y)] - 1, x1 = x[length(x)], y1 = y[length(y)] - .5) #Overwr

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Greg Snow
It is probably easier to do this without eval and parse (see fortune(106)). Something like: val <- get(dataname)[[v1]] hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-he

[R] Add an arrow to a plot

2010-07-27 Thread Trying To learn again
Hi I want to plot an x,y plot something like an scatter plot. I always have the same doubt, were is the last point of my file? Imagine it is a time series so I want the last point to indicate with an arrow (but athomatically if posible). Someone knows if it is posible? Could it be posible to ad

Re: [R] Rank ANCOVA

2010-07-27 Thread Frank Harrell
This has been shown to yield unreliable analyses. Use the more formal proportional odds ordinal logistic model. This is a generalization of the Wiloxon-Mann-Whitney-Kruskal-Wallis statistic. This is implemented in the rms package and elsewhere. Frank E Harrell Jr Professor and Chairman

Re: [R] Right digits of a floating number

2010-07-27 Thread RICHARD M. HEIBERGER
> > > As far as I can tell, the largest number R can take has 308 digits > (1+E308). > This is not a correct statement. The magnitude of the largest 64-bit double precision floating point number in R is approximately 1E308. The internal storage in R (and in most computers today) contains only th

Re: [R] Fwd: Questions about templates for R

2010-07-27 Thread Greg Snow
Look at the HSAUR package (and the book that it goes with). This may give you (your students) enough to start on several topics. If you use these examples then you should probably include the book as at least an optional text for the class. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Ce

[R] Copula-GARCH estimation

2010-07-27 Thread Jonathan B Samorajski (jsamo...@princeton.edu)
Hello, I am trying to use copula-GARCH to model a multivariate time series. So far, I have: -Estimated the GARCH(1,1) model -Obtained and standardized the residuals -Applied the pdf (Student's t in this case) to obtain (pseudo) uniform variables -Estimated the copula -Obtained a random sample fr

[R] Rank ANCOVA

2010-07-27 Thread Dennis Fisher
Colleagues I am trying to replicate some analyses performing in SAS using a "rank ANCOVA model". I assume that this is a non-parametric ANOVA with covariates but I have not been able to get confirmation from the people who did the original analyses. Can anyone direct me to the comparable func

Re: [R] re-sampling of large sacle data

2010-07-27 Thread Joshua Wiley
It looks to me like you keep sampling from some dataset 's' 10,000 times. Since you can sample() with replacement, I wonder if you could just take a sample of the size you want, rather than using a loop with sample. Perhaps along these lines: d <- apply(s, 2, sample, size = 1*nrow(s), replac

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Frank Harrell
Easiest thing is to sample with replacement from the original data. This is the idea behind the bootstrap, which is sampling from the empirical CDF. Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University On

Re: [R] Right digits of a floating number

2010-07-27 Thread jim holtman
You can get the 'bc' package for R, or just use 'bc' itself: bc 1.05 Copyright 1991, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 244^244 33351673199434891333790950239586798749134713899690921746779018273

Re: [R] re-sampling of large sacle data

2010-07-27 Thread jd6688
I am trying to do the following to accomplish the tasks, can anybody to simplify the solutions. Thanks, for (i in 1:1){ d<-apply(s,2,sample) pos_neg_tem<-t(apply(d,1,doit)) if (i>1){ pos_neg_pool<-rbind(pos_neg_pool,pos_neg_tem) }else{ pos_neg_pool<- pos_neg_tem }} -- View

Re: [R] how to generate a random data from a empirical distribition

2010-07-27 Thread Greg Snow
Another option for fitting a smooth distribution to data (and generating future observations from the smooth distribution) is to use the logspline package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message-

[R] Right digits of a floating number

2010-07-27 Thread vincent.deluard
Hi all, I am dealing with very large numbers but I am only interested in their last digits. > 244^244 [1] Inf As far as I can tell, the largest number R can take has 308 digits (1+E308). Is there a way I could see the last digits only of 244^244? Many thanks for your help. Vincent Deluard, C

Re: [R] R CMD build wiped my computer

2010-07-27 Thread Marc Schwartz
On Jul 27, 2010, at 4:53 PM, Duncan Murdoch wrote: > On 27/07/2010 4:39 PM, Jarrod Hadfield wrote: >> Hi, >> I ran R (version 2.9.0) CMD build under root in Fedora (9). When it >> tried to remove "junk files" it removed EVERYTHING in my local >> account! (See below). >> Can anyone tell me what hap

Re: [R] R CMD build wiped my computer

2010-07-27 Thread Duncan Murdoch
On 27/07/2010 4:39 PM, Jarrod Hadfield wrote: Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove "junk files" it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost

Re: [R] re-sampling of large sacle data

2010-07-27 Thread Gray Calhoun
Write a function that incorporates "doit" and the column shuffle. Let's call it "doitbetter" replicate(1, doitbetter()) You'll probably want to read the help for "replicate" to make sure the defaults are what you want. --Gray On Tue, Jul 27, 2010 at 4:43 PM, jd6688 wrote: > > myDF: > > d1

Re: [R] How to deal with more than 6GB dataset using R?

2010-07-27 Thread jim holtman
It all depends on what you are going with the data. First in your scan example, I would not read in a line at a time, but probably several thousand and then process the data. Most of your time is probably spent in reading. I assume that you are not reading it all in at once (but then maybe you a

Re: [R] hatching posibility in Panel.Polygon

2010-07-27 Thread Greg Snow
Hopefully the "right now" will be a forever. The fact that trellis graphics do not support hatching is a conscious decision or feature, not a bug or missing feature to be corrected some day (at least I for one will be disappointed if Deepayan (or someone else) gives in and implements it). Have

[R] re-sampling of large sacle data

2010-07-27 Thread jd6688
myDF: d1 d2 d3 d4 d5 -0.1669103510.022304377 -0.00825924 0.008330689 -0.000925938 -0.1669103510.022304377 -0.00825924 0.008330689 -0.000925938 -0.1669103510.022304377 -0.00825924 0.0

Re: [R] Concatenate a mix of numbers and letters to create a vector name

2010-07-27 Thread Greg Snow
This is a frequently asked/answered question (7.21 in the FAQ). What searching did you do and why did it not find this FAQ or previous discussion of it? How could the documentation/search/etc. be improved so that you (and the next n people with this question) will find the answer easier? The

Re: [R] rgl package don't draw points with a color over points with another color

2010-07-27 Thread Duncan Murdoch
On 27/07/2010 3:20 PM, rrich...@fh-lausitz.de wrote: I want to plot points with different colors to show different selections of points in a 3d plot. My problem is that if I plot a red point at a location where already a blue point was plotted, than the point is still blue. Is there a param

Re: [R] Documenting different OO-aproaches in R as a package?

2010-07-27 Thread Gabor Grothendieck
On Tue, Jul 27, 2010 at 4:17 PM, schuster wrote: > > > Hello, > > I see some people including myself confused by the different object-oriented > approaches in R (S3, S4, OOP, R.oo etc.). S3 is the primary OO approach in R and if you are new you should initially focus on that both because of its p

[R] R CMD build wiped my computer

2010-07-27 Thread Jarrod Hadfield
Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove "junk files" it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost. Panickingly, Jarrod [jar...@localhost AMan

Re: [R] Random Forest - Strata

2010-07-27 Thread Max Kuhn
The index indicates which samples should go into the training set. However, you are using out of bag sampling, so it would use the whole training set and return the OOB error (instead of the error estimates that would be produced by resampling via the index). Which do you want? OOB estimates or ot

Re: [R] How to deal with more than 6GB dataset using R?

2010-07-27 Thread Matthew Keller
I've found that opening a connection, and scanning (in a loop) line-by-line, is far faster than either read.table or read.fwf. E.g, here's a file (temp2) that has 1500 rows and 550K columns: showConnections(all=TRUE) con <- file("temp2",open='r') system.time({ for (i in 0:(num.samp-1)){ new.gen[

[R] Documenting different OO-aproaches in R as a package?

2010-07-27 Thread schuster
Hello, I see some people including myself confused by the different object-oriented approaches in R (S3, S4, OOP, R.oo etc.). Would it be ok to collect examples and solutions for the different OO-packages in one package and add a vignette for documentation? (assuming I find time for this t

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Jorge A. Ahumada
Yes, this solved the problem. Thanks. Jorge On 7/27/10 3:13 PM, "Duncan Murdoch" wrote: > On 27/07/2010 2:34 PM, Jorge A. Ahumada wrote: >> > I am writing a function where the arguments are names of objects or >> variable >> > names in a data frame. To convert the strings to the objects I am u

[R] Multiple Strata Sampling in R Survey

2010-07-27 Thread Owen Gallagher
Hello, I'm using the package survey, version 3.22-2 in R 2.11.1, on windows XP, but this isn't a platform issue. I am trying to calculate some regression and probability proportional to size (pps) estimates for a dataset I have. The data has 2 strata, weights, and cluster IDs. However, I can't fi

[R] rgl package don't draw points with a color over points with another color

2010-07-27 Thread rrich...@fh-lausitz.de
I want to plot points with different colors to show different selections of points in a 3d plot. My problem is that if I plot a red point at a location where already a blue point was plotted, than the point is still blue. Is there a parameter or so which can be used to draw over a existing po

Re: [R] Random Forest - Strata

2010-07-27 Thread Coll
Thanks for all the help. I had tried using the "index" in caret to try to dictate which rows of the sample would be used in each of the tree building in RF. (e.g. use all data from A B site for training, hold out all data from C site for testing etc) However after running, when I cross-checked

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Duncan Murdoch
On 27/07/2010 2:34 PM, Jorge A. Ahumada wrote: I am writing a function where the arguments are names of objects or variable names in a data frame. To convert the strings to the objects I am using eval(parse(text=name)): f.graph.two.vbs<-function(dataname,v1){ val<-paste(dataname,v1,sep

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Jorge A. Ahumada
Well, the data set I am using is quite large, but RECORD is also a numeric variable and data is a data frame. Here is my sessionInfo(): >sessionInfo() R version 2.11.0 (2010-04-22) i386-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1]

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Jorge Ivan Velez
Hi Jose, What's the problem? # some data set.seed(123) mydata <- data.frame(x = rnorm(10), y = rpois(10, 10)) mydata f.graph.two.vbs<-function(dataname,v1){ val<-paste(dataname,v1,sep="$") val<-eval(parse(text=val)) val } f.graph.two.vbs('mydata', 'x') [1] -0.56047565 -0.23

Re: [R] Eval() or parse() do not work inside function

2010-07-27 Thread Joshua Wiley
Dear Jorge, It might help if you included some sample data that replicates your problem, or, perhaps, the results of sessionInfo(). I cannot replicate it. Here are my results: > data <- data.frame(A = 1:10, RECORD = 1:10) > > f.graph.two.vbs<-function(dataname,v1){ + val<-paste(dataname,v1,s

[R] Eval() or parse() do not work inside function

2010-07-27 Thread Jorge A. Ahumada
I am writing a function where the arguments are names of objects or variable names in a data frame. To convert the strings to the objects I am using eval(parse(text=name)): f.graph.two.vbs<-function(dataname,v1){ val<-paste(dataname,v1,sep="$") val<-eval(parse(text=val)) val

[R] Prediction Intervals vs. Confidence Bands

2010-07-27 Thread Matt Stati
When I ask R to compute: predict(data, int = "c"), following a linear regression, what is it computing exactly? How are these lower and upper "prediction" limits different than what I would get for confidence limits? Thanks, Matt. [[alternative HTML version deleted]] __

[R] AIC from coxme

2010-07-27 Thread Christopher David Desjardins
Hi, I am running the following model: fit1.full <- coxme(Surv(age_sym1, sym1) ~ sex + lifedxm*sex + (1|famid), data=bip.surv) I would like to extract the AIC from that object to calculate the AICC. However, when I look at str(fit1.full) and summary(fit1.full) (pasted below) I don't see anything th

Re: [R] standard error of Binary logistic regression coefficient.

2010-07-27 Thread Joshua Wiley
Hi, Just to extend the excellent suggestions, if you are interested in the odds ratio, you can just use exp(): #Odds Ratio exp(fit4$coefficients) #Confidence interval around OR exp(confint(fit4)) To give you an idea graphically of the log odds (or logit) look at: p <- seq(0, 1, by = .001) plot

Re: [R] Cluster analysis

2010-07-27 Thread Pablo Cerdeira
Hi Jim, Ow! Very nice job at http://mephisto.unige.ch/traminer/preview.shtml I´m going to read more about it. I have a lot of different steps, in a sequence. Actually, 586 different possible steps, but I have 4269 legal cases, with a maximum of 379 steps each one. If you want, I can send this da

Re: [R] Sweave and scan()

2010-07-27 Thread Charles C. Berry
On Tue, 27 Jul 2010, Murray Jorgensen wrote: I am introducing the scan() function to my class. Consider the following file (Scanexamp.Rnw ) \documentclass[12pt]{article} \begin{document} <<>> = height = scan() 64 62 66 65 62 69 72 72 70 part = scan(what = character(0)) "Soprano" "Soprano" "

Re: [R] standard error of Binary logistic regression coefficient.

2010-07-27 Thread Achim Zeileis
On Tue, 27 Jul 2010, John Sorkin wrote: Do not worry about the SE. The SE listed on the output is the SE of the log odds. You can use the estimate (beta) and SE from the listing to compute a confidence interval (CI)as follows: CI exp(beta-1.96*SE) to exp(beta-1.96*SE) The standard errors can

Re: [R] Cluster analysis

2010-07-27 Thread Pablo Cerdeira
Hi Allan, It helps a lot. I´ll try to read more about it. But, as you asked me, here goes a brief explanation about the necessary columns of the sample date paste at the end: id_processo: identify a legal case, it is its primary key. ordem_andamento: is the step number inside a legal case (id_pr

Re: [R] standard error of Binary logistic regression coefficient.

2010-07-27 Thread John Sorkin
Do not worry about the SE. The SE listed on the output is the SE of the log odds. You can use the estimate (beta) and SE from the listing to compute a confidence interval (CI)as follows: CI exp(beta-1.96*SE) to exp(beta-1.96*SE) John John Sorkin Chief Biostatistics and Informatics Univ. of Maryla

Re: [R] Fwd: Questions about templates for R

2010-07-27 Thread Charles C. Berry
On Mon, 26 Jul 2010, Alon Friedman wrote: Hi I am looking for R templates to introduce the R to my students at Seton hall university. The templates are predefined scripts in R that will retain its primary intent when individually customized with their own variable data or text. Well the help

Re: [R] UseR! 2010 - my impressions

2010-07-27 Thread Max Kuhn
Not to beat a dead horse... I've found that I like the useR conferences more than most statistics conferences. This isn't due to the difference in content, but the difference in the audience and the environment. For example, everyone is at useR because of their appreciation of R. At most other co

Re: [R] how to generate a random data from a empirical, distribition

2010-07-27 Thread Marshall Feldman
On 7/27/2010 6:00 AM, r-help-requ...@r-project.org wrote: Date: Mon, 26 Jul 2010 11:36:29 -0700 (PDT) From: xin wei To:r-help@r-project.org Subject: [R] how to generate a random data from a empirical distribition Message-ID:<1280169389379-2302716.p...@n4.nabble.com> Content-Type: text/pla

Re: [R] Cforest mincriterion

2010-07-27 Thread Matthew OKane
Thanks for the quick reply. That makes sense, although I am still confused why the functions prevent mincriterion from being lower than 0 as to run cforests with "testtype" as "Teststatistic" and grow maximum depth trees you need to put in qnorm(0) (= -inf) which is impossible? I will stick to ot

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-27 Thread Charles C. Berry
On Tue, 27 Jul 2010, Christopher David Desjardins wrote: Hi Charles, On Fri, 2010-07-23 at 14:40 -0700, Charles C. Berry wrote: On Fri, 23 Jul 2010, Christopher David Desjardins wrote: Sorry. I should have included some data. I've attached a subset of my data (50/192) cases in a Rdata file a

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Prof Brian Ripley
On Tue, 27 Jul 2010, Allan Engelhardt wrote: Great, thanks. I couldn't quite get your syntax to work, but Did you use R-devel? The syntax has changed ... and that's why I said 'e.g.'. z <- packageStatus(.libPaths()[1])[[1]] unname( z$Package[z$Status == "unavailable"] ) seems to do the

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Allan Engelhardt
Great, thanks. I couldn't quite get your syntax to work, but z <- packageStatus(.libPaths()[1])[[1]] unname( z$Package[z$Status == "unavailable"] ) seems to do the trick for me. Thanks again. Allan On 27/07/10 16:31, Prof Brian Ripley wrote: If I understand you correctly, set the filter and

[R] standard error of Binary logistic regression coefficient.

2010-07-27 Thread Bessy
Dear all, I am struggling with the calculation of standard error of the coefficient in Binary logistic regression analysis. I built a binary logsitic regression model as follows and got confused since the calculation of standard error of coefficients of X1, X2 and X3 are not the same as the Line

Re: [R] Glm

2010-07-27 Thread Gray Calhoun
Hi Ana, Does the "predict" function do what you want? Type in ?predict.lm --Gray On 7/27/10, Ana De Barros wrote: > Hi, > > Is there any way to estimate a DEPENDENT variable through a GLM/LM model? > > Suppose I have the linear model: y=a0+a1*x1+a2*x2 (a0=1, a1=0.6, a2=0.8, > x1~N(1,1), x2~N(0

Re: [R] Cforest mincriterion

2010-07-27 Thread Achim Zeileis
On Tue, 27 Jul 2010, Matthew OKane wrote: Hi, Could anyone help me understand how the mincriterion threshold works in ctree and cforest of the party package? I've seen examples which state that to satisfy the p < 0.05 condition before splitting I should use mincriterion = 0.95 while the docume

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Prof Brian Ripley
If I understand you correctly, set the filter and use packageStatus(). Its summary() method tells you which packages you have installed which are 'unavailable'. E.g. my Mac (with pkgType = "source") shows in R-devel summary(packageStatus(.libPaths()[1]))$Libs[[1]]$unavailable [1] "BayesX"

Re: [R] Survival analysis MLE gives NA or enormous standard errors

2010-07-27 Thread Christopher David Desjardins
Hi Charles, On Fri, 2010-07-23 at 14:40 -0700, Charles C. Berry wrote: > On Fri, 23 Jul 2010, Christopher David Desjardins wrote: > > > Sorry. I should have included some data. I've attached a subset of my > > data (50/192) cases in a Rdata file and have pasted it below. > > > > Running anova I g

[R] Cforest mincriterion

2010-07-27 Thread Matthew OKane
Hi, Could anyone help me understand how the mincriterion threshold works in ctree and cforest of the party package? I've seen examples which state that to satisfy the p < 0.05 condition before splitting I should use mincriterion = 0.95 while the documentation suggests I should use mincriterion =

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Gabor Grothendieck
On Tue, Jul 27, 2010 at 9:48 AM, Gabor Grothendieck wrote: > On Tue, Jul 27, 2010 at 7:17 AM, Allan Engelhardt wrote: >> I only recently discovered options("available_packages_filters" = list(add = >> TRUE, "license/FOSS")) [cf. help("available.packages", package="utils") in R >> 2.10.0 or later]

Re: [R] Installing the Zoo Library.

2010-07-27 Thread Gabor Grothendieck
On Tue, Jul 27, 2010 at 10:02 AM, Rnoobie wrote: > > Hi Ya'll > > I'm trying to install the zoo library... I've downloaded about 5 or 6 of > their releases (inc. the latest one), all of them giving me the same syntax > error when trying to install... > > Anyone seen this problem before? its not th

[R] Installing the Zoo Library.

2010-07-27 Thread Rnoobie
Hi Ya'll I'm trying to install the zoo library... I've downloaded about 5 or 6 of their releases (inc. the latest one), all of them giving me the same syntax error when trying to install... Anyone seen this problem before? its not the "lib" argument that is the problem (ive been installing oth

Re: [R] Cluster analysis

2010-07-27 Thread Jim Porzak
Pablo, we've had success using http://mephisto.unige.ch/traminer/preview.shtml to look at marketing paths. Question would be how many distinct case step discriptions are there? HTH, Jim On Jul 26, 2010 9:44 AM, "Pablo Cerdeira" wrote: Hi all, I have no idea if this question is to easy to be an

Re: [R] xYplot error

2010-07-27 Thread Frank Harrell
If the x-axis variable is really a factor, xYplot will not handle it. You probably need a dot chart instead (see Hmisc's Dotplot). Note that it is unlikely that the confidence intervals are really symmetric. Frank On Tue, 27 Jul 2010, Kang Min wrote: Hi, I'm trying to plot a graph with err

Re: [R] OOP module

2010-07-27 Thread Steve Lianoglou
Hi, On Tue, Jul 27, 2010 at 4:14 AM, Albert-Jan Roskam wrote: > Thank you! As an R newbie I sometimes find it confusing that in R everything > can be done in at least four different ways. My question about S4/OOP was > motivated by the fact that those two class systems have the same designer >

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Gabor Grothendieck
On Tue, Jul 27, 2010 at 7:17 AM, Allan Engelhardt wrote: > I only recently discovered options("available_packages_filters" = list(add = > TRUE, "license/FOSS")) [cf. help("available.packages", package="utils") in R > 2.10.0 or later] which goes nicely with my options("checkPackageLicense" = > TRUE

[R] xYplot error

2010-07-27 Thread Kang Min
Hi, I'm trying to plot a graph with error bars using xYplot in the Hmisc package. My data looks like this. mortstand sitetype 0.042512776 0.017854525 Plot A ST 0.010459803 0.005573305 PF ST 0.005188321 0.006842107MSFST 0.004276068 0.01

Re: [R] xyplot with all columns of a data.frame on a single plot

2010-07-27 Thread Phil Spector
One of the nice features of R's formula syntax is that you can create a character string containing a formula, and pass it to the formula() function. For example: xyplot(formula(paste(paste(paste('D',1:10,sep=''),collapse='+'),'X',sep='~')),data) will do what you want.

Re: [R] Checking package licences including dependencies?

2010-07-27 Thread Allan Engelhardt
On 27/07/10 13:20, Ben Bolker wrote: Allan Engelhardt cybaea.com> writes: I only recently discovered options("available_packages_filters" = list(add = TRUE, "license/FOSS")) [cf. help("available.packages", package="utils") in R 2.10.0 or later] which goes nicely with my options("checkPack

[R] Glm

2010-07-27 Thread Ana De Barros
Hi, Is there any way to estimate a DEPENDENT variable through a GLM/LM model? Suppose I have the linear model: y=a0+a1*x1+a2*x2 (a0=1, a1=0.6, a2=0.8, x1~N(1,1), x2~N(0,1)). The alphas and the auxiliary variables are given and I have to estimate y. The point is if I estimate it, let¹s say algebr

Re: [R] Sum list elements

2010-07-27 Thread baptiste auguie
Hi, do.call(sum, mylist) ?do.call baptiste On 27 July 2010 14:36, Nicola Sturaro Sommacal wrote: > Hi! > > I have a list of 24 elements, all of the same type (dataframe, for example). > > I am looking for an alternative to mylist[[1]] + mylist[[2]] + ... + > mylist[[24]] to obtain the sum. > >

Re: [R] Sum list elements

2010-07-27 Thread Dimitris Rizopoulos
Have a look at Reduce(), e.g., Reduce("+", your.list) I hope it helps. Best, Dimitris On 7/27/2010 2:36 PM, Nicola Sturaro Sommacal wrote: Hi! I have a list of 24 elements, all of the same type (dataframe, for example). I am looking for an alternative to mylist[[1]] + mylist[[2]] + ... +

  1   2   >