Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Tobias Verbeke
Wensui Liu wrote: well, how difficult to code random forest with sas macro + proc split? if you are lack of sas programming skill, then you are correct that you have to wait for 8 years :-) It is true one can use the macro language to obtain some control flow the plain SAS language and its PR

[R] loading .Rdata files please ignore

2009-06-19 Thread Erin Hodgess
Nothing like posting to the list to make you find an answer! file.info does the trick for file size! Thanks anyway, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com __

[R] loading .Rdata files

2009-06-19 Thread Erin Hodgess
Dear R People: I'm loading several thousand .Rdata files in sequence. If one of them is empty, the function crashes. I am thinking about using system(wc ) etc., and strsplit for the results, but was wondering if there is a more clever way via a file type command, please. Thanks, Erin -- Erin

[R] how to apply the dummy coding rule in a dataframe with complete factor levels to another dataframe with incomplete factor levels?

2009-06-19 Thread Sean Zhang
Dear R helpers: Sorry to bother for a basic question about model.matrix. Basically, I want to apply the dummy coding rule in a dataframe with complete factor levels to another dataframe with incomplete factor levels. I used model.matrix, but could not get what I want. The following is an example.

Re: [R] read.table error

2009-06-19 Thread jim holtman
Try comment.char='', quote='' You may have unbalanced quotes or comments (#) in your data. On Fri, Jun 19, 2009 at 5:50 PM, Forafo San wrote: > Hello, > > I'm receiving an error on attempting to use the read.table() function > to read in data from a tab-delimited file. The file has more than >

Re: [R] please recommend hands-on books on classification, data-mining and machine learning with R?

2009-06-19 Thread Rob Denniker
Seriously? Did you not receive the reply to the same question from Uwe Ligges at 12:31pm today? You are overfishing the common pool, bro. 2009/6/19 Uwe Ligges : Most of the times it is advisable to get a good book about the statistical concepts (multivariate statistics or data-mining) and anoth

Re: [R] please recommend hands-on books on classification, data-mining and machine learning with R?

2009-06-19 Thread Rob Denniker
Seriously? Did you not receive the reply to the same question from Uwe Ligges at 12:31pm today? You are overfishing the common pool, bro. 2009/6/19 Uwe Ligges : Most of the times it is advisable to get a good book about the statistical concepts (multivariate statistics or data-mining) and anoth

Re: [R] please recommend hands-on books on classification, data-mining and machine learning with R?

2009-06-19 Thread Rob Denniker
Seriously? Did you not receive the reply to the same question from Uwe Ligges at 12:31pm today? You are overfishing the common pool, bro. 2009/6/19 Uwe Ligges : Most of the times it is advisable to get a good book about the statistical concepts (multivariate statistics or data-mining) and anoth

Re: [R] Dealing with a counted variable

2009-06-19 Thread Charles C. Berry
See ?xtabs and take note of the examples HTH, Chuck On Fri, 19 Jun 2009, John Lipkins wrote: Dear all, I sometimes receive data which has a following layout: Age urban   count 34    X 13 64    3 In which count represents the amount of times a certain

[R] please recommend hands-on books on classification, data-mining and machine learning with R?

2009-06-19 Thread Michael
Hi all, Could anybody please recommend some hands-on books on classification, data-mining and machine learning with R? I would like to get a very good understanding of the statistical tools that are used in these areas, while reducing the learning curve. Thank you! __

Re: [R] a plot of stacked boxes

2009-06-19 Thread Richard M. Heiberger
I think you are looking for mosaic() table(df) library(vcd) mosaic(outcome ~ group, data=df) Rich __ 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

Re: [R] read.table error

2009-06-19 Thread Gabor Grothendieck
Use the count.fields function to find out how many fields it thinks each row has. On Fri, Jun 19, 2009 at 5:50 PM, Forafo San wrote: > Hello, > > I'm receiving an error on attempting to use the read.table() function > to read in data from a tab-delimited file. The file has more than > 60,000 rows

Re: [R] read.table error

2009-06-19 Thread Peter Ehlers
I'm guessing that there's something wrong with one of your column separators. Have you tried leaving out the 'sep="\t"' argument? -P Forafo San wrote: Hello, I'm receiving an error on attempting to use the read.table() function to read in data from a tab-delimited file. The file has more than

Re: [R] How to import timestamps from emails into R

2009-06-19 Thread Gabor Grothendieck
Try this: Lines <- "Sun, 14 Jun 2009 07:33:00 -0700 Sun, 14 Jun 2009 08:35:10 -0700 Sun, 14 Jun 2009 21:26:34 -0700 Mon, 15 Jun 2009 19:47:47 -0700 Wed, 17 Jun 2009 21:50:41 -0700" # L <- readLines("myfile.txt") L <- readLines(textConnection(Lines)) tt <- as.POSIXct(L, format = "%a, %d %b %Y %H:

[R] How to import timestamps from emails into R

2009-06-19 Thread Thomas Levine
I am analysing occurrences of a phenomenon by time, and each of these timestamps taken from email headers represents one occurrence. (The last number is the time zone.) I can easily change the format. Sun, 14 Jun 2009 07:33:00 -0700 Sun, 14 Jun 2009 08:35:10 -0700 Sun, 14 Jun 2009 21:26:34 -0700 M

[R] read.table error

2009-06-19 Thread Forafo San
Hello, I'm receiving an error on attempting to use the read.table() function to read in data from a tab-delimited file. The file has more than 60,000 rows with 94 tab-delimited columns. However, the error occurs on row 3 of the file: > wl <-read.table("sr003lines.tab", header=T, sep="\t") Error i

[R] Dealing with a counted variable

2009-06-19 Thread John Lipkins
Dear all, I sometimes receive data which has a following layout: Age urban   count 34    X 13 64    3 In which count represents the amount of times a certain observation has been fulfilled. How ever when using this data in R I’m confronted with the fact that R c

Re: [R] joint estimation of two poisson equations

2009-06-19 Thread ryusuke
ryusuke wrote: > > > > Owen Powell-2 wrote: >> >> Thanks Tirthankar, that did the trick. >> Here's the solution to my problem using the "bivpois" package: >> >> rm(list = ls()) >> library(bivpois) >> >> y1 = c(1,2,3,4,4,3) >> y2 = c(0,2,0,2,3,5) >> x1 = c(2,3,4,8,1,3) >> x2 = c(3,5,6,7,8,9

[R] a difficulty in boot package

2009-06-19 Thread Seunghee Baek
Hi, I have a problem in programming for bootstrapping. I don't know why it show the error message. Please see my code below: #'st' is my original dataset. #functions of 'fml.mlogl','pcopula.fam4','ltd','invltd' are already defined boot.OR<-function(data,i) { E=data[i,] ml1<-glm(c_VAsex90_bf ~ trt

Re: [R] ifelse(is.na), with function inside

2009-06-19 Thread Grześ
:) Thank you very much! I have already found solution. I have always problem with connect logical value and vector :/ You know... everybody helped me a little. Thanks very much again! Grzesiek Petr Pikal wrote: > > Hi > > r-help-boun...@r-project.org napsal dne 17.06.2009 14:59:35: > >> >

Re: [R] Writting multiple tables to csv

2009-06-19 Thread Gabor Grothendieck
Try using append= like this where BOD is built into R: write.table(BOD[1:3,], "BOD.txt", row.names = FALSE, sep = "\t") write.table(BOD[4:5,], "BOD.txt", row.names = FALSE, sep = "\t", col.names = FALSE, append = TRUE) On Fri, Jun 19, 2009 at 5:20 PM, baked Toast wrote: > Hey, > > Is it possible

[R] Writting multiple tables to csv

2009-06-19 Thread baked Toast
Hey, Is it possible to write multiple tables at once to a cvs file? Because these tables are of different lengths I can not use cbind. When I use following: Test <- c(capture.output(table(test1),capture.output(table(test2)) write.table(Test,”test.csv”,row.names=FALSE,sep=”\t”) I receive messy, u

Re: [R] correlation between categorical data

2009-06-19 Thread Dylan Beaudette
Not an expert, but I would try some of the following: # tabulate joint frequencies ?table ?xtabs # plotting mosaicplot(Titanic, main = "Survival on the Titanic", color = TRUE, shade=TRUE) # log-linear models check the library for more ideas. Cheers, Dylan On Fri, Jun 19, 2009 at 2:04 PM, Mich

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Wensui Liu
well, how difficult to code random forest with sas macro + proc split? if you are lack of sas programming skill, then you are correct that you have to wait for 8 years :-) i don't know how much sas experience you have. as far as i know, both bagging and boosting have been implemented in sas em for

[R] correlation between categorical data

2009-06-19 Thread Michael
Hi all, In a data-frame, I have two columns of data that are categorical. How do I form some sort of measure of correlation between these two columns? For numerical data, I just need to regress one to the other, or do some pairs plot. But for categorical data, how do I find and/or visualize cor

Re: [R] Random number datasets help

2009-06-19 Thread Marc Schwartz
On Jun 19, 2009, at 10:25 AM, Alexandre Lockhart wrote: My other question involved formatting my output. Normally, my text file has 8 columns, each column with 500 values before the next 8 below are generated, and so on until 28 are reached. I have examined formatting issues with each f

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Tobias Verbeke
Wensui Liu wrote: in terms of the richness of features and ability to handle large data(which is normal in bank), SAS EM should be on top of others. Should be ? That is not at all my experience. SAS EM is very much lagging behind current research. You will find variants of random forests in R

[R] bivariate time series

2009-06-19 Thread Erin Hodgess
Dear R People: Does anyone have any "real world" bivariate time series that I could use for testing purposes, please? thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Wensui Liu
in terms of the richness of features and ability to handle large data(which is normal in bank), SAS EM should be on top of others. however, it is not cheap. in terms of algorithm, split procedure in sas em can do chaid/cart/c4.5, if i remember correctly. On Fri, Jun 19, 2009 at 2:35 PM, Carlos J.

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Peter Flom
"Carlos J. Gil Bellosta" wrote > >I had a conversation with a guy working in a "business intelligence" >department at a major Spanish bank. They rely on recursive partitioning >methods to rank customers according to certain criteria. > >They use both SAS EM and Salford Systems' CART. I have used

[R] typo in Lomb-Scargle periodogram implementation in spec.ls() from cts package?

2009-06-19 Thread Mikhail Titov
Hello! I tried to contact author of the package, but I got no reply. That is why I write it here. This might be useful for those who were using cts for spectral analysis of non-uniformly spaced data. In file spec.ls.R from cts_1.0-1.tar.gz lines 59-60 are written as pgram[k, i, j] <- 0.5 * ((s

[R] Recursive partitioning algorithms in R vs. alia

2009-06-19 Thread Carlos J. Gil Bellosta
Dear R-helpers, I had a conversation with a guy working in a "business intelligence" department at a major Spanish bank. They rely on recursive partitioning methods to rank customers according to certain criteria. They use both SAS EM and Salford Systems' CART. I have used package R part in the

Re: [R] good boosting tutorial and package in R?

2009-06-19 Thread Gabor Grothendieck
See http://cran.r-project.org/web/views/MachineLearning.html On Fri, Jun 19, 2009 at 1:24 PM, Michael wrote: > Hi all, > > Could you please give me some pointers about what's the best boosting > package in R currently? > > in terms of classification accuracy? > > And any pointers about tutorials

Re: [R] good boosting tutorial and package in R?

2009-06-19 Thread Mose
You'd probably get a kick out of the CARET package documentation (and the package). http://cran.r-project.org/web/packages/caret/index.html On Fri, Jun 19, 2009 at 10:24 AM, Michael wrote: > Hi all, > > Could you please give me some pointers about what's the best boosting > package in R currentl

Re: [R] Adding site id to xyplot

2009-06-19 Thread Deepayan Sarkar
On 6/19/09, SEUNG CHEON HONG wrote: > Dear R Lists, > > Can anyone help me add site IDs (site: 1~50) directly to my xyplot. I have > 50 sites and collected observations from the sites at 13 different time > points. I want to look at the change of my observations in each site. I was > able to m

Re: [R] lattice: axis ticks, axis alignment and remove axis from plot

2009-06-19 Thread Deepayan Sarkar
On 6/18/09, Katharina May wrote: > Hi Sorn, > > thanks for your code. I guess I didn't really made myself very clear. > What I sort of looking for is a xyplot with both the x axis at the bottom > and y axis at the > left going through 0, but continuing in the positive and negative area > (fo

Re: [R] lattice logaritmic scale (basis "e" ), rewriting labels using xscale.component

2009-06-19 Thread Deepayan Sarkar
On 6/18/09, Katharina May wrote: > Hi there, > > sorry for troubling everybody once again, I've got a problem rewriting > Sarkar's function for > rewriting the tick locations in a logaritmic way (s. > http://lmdvr.r-forge.r-project.org/code/Chapter08.R): > > His example works for log 2 but I

[R] good boosting tutorial and package in R?

2009-06-19 Thread Michael
Hi all, Could you please give me some pointers about what's the best boosting package in R currently? in terms of classification accuracy? And any pointers about tutorials and study-materials to curb the learning curve will be greatly appreciated! Thank you! p.s. Does anybody happen to know Bo

Re: [R] biOps load failed after being used for one week

2009-06-19 Thread Michelle2009
Thank you Uwe Ligges! I had libtiff3.dll in the path. I aslo tested to put libtiff.dll in the path without zlib1.dll, it didn't work. When I put zlib1.dll in the path, it works. Michelle Uwe Ligges-3 wrote: > > > > Michelle2009 wrote: >> With help from my colleague, I found the problem. Afte

Re: [R] Unable to use jpeg(), png() etc.....

2009-06-19 Thread Uwe Ligges
Have you compiled R yourself? If so, you probably have the header files for png and friends support not installed. If you have a binary install, the one who compiled R for you have not had it. Uwe Ligges Martial Sankar wrote: Hello, I 've just re-installed R 2.9.0 on ubuntu 9.04. I do n

Re: [R] question about adding plots in a grid (lattice package)

2009-06-19 Thread Deepayan Sarkar
On 6/16/09, Marion Dumas wrote: > Hello! > I am starting to use the lattice package. I generated an xyplot conditioned > on a factor that has three levels: hence I get three plots in three panels > spaces and one is left empty. I would like to add a plot to the empty panel > space. Is it possible

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread Uwe Ligges
tbigdeli wrote: My apologies for being overly brief before.. I submit an R script to batch mode as follows: a list of files (object = 'files'). In each iteration, the next file is read, alterations made, working directory changed, and output file written out. R will take an inordinate amoun

[R] Sweave and xtable floating issues -- SOLVED

2009-06-19 Thread Liviu Andronic
Dear all, I've recently made in LyX a report using Sweave and run into troubles with xtable() generated LaTeX tables. One example, xtable() commands inside floats (table, box (minipage), etc.) will make the LaTeX compilation fail. Another, if four-five xtable() commands are run in a sequence, at le

Re: [R] problem with axis alignment when plotting 2 time series on same graph

2009-06-19 Thread Uwe Ligges
josef.kar...@phila.gov wrote: I am trying to plot 2 time series on the same graph. For example, X1 is the vector of dates and times, its class is POSIXt. Y1 is an environmental parameter, e.g. salinity. X2 is a second vector of dates and times, also of class POSIXt.X2 has a different leng

Re: [R] paramter restriction in optim

2009-06-19 Thread Uwe Ligges
laist wrote: Hi, I would like to know if you could help me... I need to restrict a parameter in a problem of optimization but I don't know how to do it. function(s){ c<-s[1] a1<-s[2] a2<-s[2] return(-sum()) } optim(...) In fact I need to know how to specify 0<=a1<=1. I've tried but without

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread tbigdeli
My apologies for being overly brief before.. I submit an R script to batch mode as follows: a list of files (object = 'files'). In each iteration, the next file is read, alterations made, working directory changed, and output file written out. R will take an inordinate amount of time processin

Re: [R] a plot of stacked boxes

2009-06-19 Thread David Winsemius
Perhaps this package can help: http://cran.r-project.org/web/packages/vcd/index.html Page 4 of this vignette looks like a complete solutions has already been programmed: http://cran.r-project.org/web/packages/vcd/vignettes/residual-shadings.pdf -- On Jun 19, 2009, at 12:41 PM, Osman Al-Rad

Re: [R] getting cd_plot in vcd package to work with layout

2009-06-19 Thread Uwe Ligges
Lyndon Walker wrote: Hi, I'm trying to get 2x2 (or other layouts) of cd_plot from the vcd package. I have tried the usual commands like layout, par(mfrow...) etc and but cd_plot seems to ignore them and send the plotting window back to 1x1. I have also tried turning off the pop and newpage op

[R] a plot of stacked boxes

2009-06-19 Thread Osman Al-Radi
Hello, I would like to create a plot composed of stacked boxes (squares or rectangles), where the size of the box would represent the frequency of observations based on a categorical variable (group), the color would represent the proportion of success (binary) within that group (outcome) on a pre

Re: [R] IP-Address

2009-06-19 Thread David Huffer
On Wednesday, June 17, 2009 3:33 PM, edwin wrote: > Sorry, David has just told my that it was a mistake in my > example (Thanks David). I had a wrong idea. The right idea is: > make a ip range, when the number increament without an gap (and > with maximum number: 255, see example down). > In

Re: [R] Fancy Ticks in Plots

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 11:58 AM, Lorenzo Isella wrote: Dear All, I am pretty satisfied with R for my plotting, but there are a few subtleties which I cannot figure out. Consider figure 1 in the paper at the link below http://cxnets.googlepages.com/univ_citations.pdf Like this? http://dsarka

Re: [R] reducing space between tickmark labels and axes labels

2009-06-19 Thread Uwe Ligges
Eva Schultner wrote: Hello, Does anybody know if it is possible to reduce the spaces between axes labels and axes lables in boxplots? One way is to omit them at first and put them into the desired margin line with a call to mtext() later on. Uwe Ligges I am trying to fit several plots

Re: [R] resampling the entire row

2009-06-19 Thread Chuck Cleland
On 6/19/2009 10:59 AM, Seunghee Baek wrote: > Hi, > For bootstrapping method, I would like to resample the entire row instead of > one column. > What should I do? iris[sample(x=nrow(iris), replace=TRUE),] But I would look at the boot package or other packages related to bootstrapping. > Thank

Re: [R] hands-on book on multivariate statistics and data-mining with R?

2009-06-19 Thread Uwe Ligges
Michael wrote: Hi all, I am looking for pointers to good hands-on books on multivariate statistics and data-mining with R? So that I could learn while doing experiments... Most of the times it is advisable to get a good book about the statistical concepts (multivariate statistics or data-m

Re: [R] Leave One Out Cross Validation

2009-06-19 Thread Uwe Ligges
See the posting guide: If you provide commented, minimal, self-contained, reproducible code some people may be willing to help on the list. Best, Uwe Ligges muddz wrote: Hi All, I have been trying to get this LOO-Cross Validation method to work on R for the past 3 weeks but have had no luck

Re: [R] searching help for partial matches

2009-06-19 Thread Uwe Ligges
Double the question mark as in: ??allequal Uwe Ligges Steve Jaffe wrote: The situation is that I know there is a function and know approximately what the name is, and want to find the exact name. Is there a way of searching for near-matches (similar to unix apropos). For example, I know ther

Re: [R] reading geotiff into Splus or R

2009-06-19 Thread B. H. Braswell
Hi Scott, Have you tried rgdal? http://cran.r-project.org/web/packages/rgdal/index.html Rob -- Rob Braswell University of New Hampshire On Jun 19, 2009, at 10:48 AM, Scott Saleska wrote: I am looking for an easy way to import data in a GEOTIFF file into Splus or R. Any suggestions? Tha

[R] reading geotiff into Splus or R

2009-06-19 Thread Scott Saleska
I am looking for an easy way to import data in a GEOTIFF file into Splus or R. Any suggestions? Thanks, Scott Scott R. Saleska Assistant Professor, Ecology and Evolutionary Biology Director, PIRE Program in Amazon-Climate Interactions University of Arizona 1041 E. Lowell St. BioSciences Wes

[R] a plot of stacked boxes

2009-06-19 Thread Osman Al-Radi
Hello, I would like to create a plot composed of stacked boxes (squares or rectangles), where the size of the box would represent the frequency of observations based on a categorical variable (group), the color would represent the proportion of success (binary) within that group (outcome) on a pre

[R] paramter restriction in optim

2009-06-19 Thread laist
Hi, I would like to know if you could help me... I need to restrict a parameter in a problem of optimization but I don't know how to do it. function(s){ c<-s[1] a1<-s[2] a2<-s[2] return(-sum()) } optim(...) In fact I need to know how to specify 0<=a1<=1. I've tried but without success Thank

[R] resampling the entire row

2009-06-19 Thread Seunghee Baek
Hi, For bootstrapping method, I would like to resample the entire row instead of one column. What should I do? Thanks, Becky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Fancy Ticks in Plots

2009-06-19 Thread Lorenzo Isella
Dear All, I am pretty satisfied with R for my plotting, but there are a few subtleties which I cannot figure out. Consider figure 1 in the paper at the link below http://cxnets.googlepages.com/univ_citations.pdf Can I have the same kind of ticks in an R-generated figure (that is to say: ticks

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Ravi Varadhan
This gives a failrly long list: http://www.amazon.com/Books-history-Probability-Statistics/lm/R1WZ9DISAO6OGX Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriat

Re: [R] Reading from Google Docs

2009-06-19 Thread Uwe Ligges
See the manual "R Installation and Administration" for information on how to install source packages on Windows. Uwe Ligges Farrel Buchinsky wrote: After issuing tar xvfz RgoogleDocs_0.2.2-src.tar.gzI am getting an error message 'tar' is not recongnized as an internal or external command, oper

Re: [R] Alternate ways of finding number of occurrence of an element in a vector.

2009-06-19 Thread Allan Engelhardt
When trying out a couple of different approaches to this problem I get rather different answers between runs. Anybody know why? > library("rbenchmark") > v<-rep(1:1000,1:1000); x<-5; benchmark(replications=200, columns=c("test","elapsed"), order="elapsed", which=length(which(x==v)), index=len

Re: [R] Reading from Google Docs

2009-06-19 Thread Farrel Buchinsky
After issuing tar xvfz RgoogleDocs_0.2.2-src.tar.gzI am getting an error message 'tar' is not recongnized as an internal or external command, operable program or batch file. Should I use my 7-zip to open up the archive? Where should I be doing this? For instance can I do it all in my download dire

Re: [R] Cannot install a package - with a funny error message

2009-06-19 Thread Uwe Ligges
What's funny with the error message? I think it is not funny that you have not provided relevant information as requestes in the posting guide for R-help, e.g. on: OS, R version, CRAN mirror you try to use, internet connection via proxy or not, ... Hence we cannot help. Uwe Ligges Alon B

Re: [R] Random number datasets help

2009-06-19 Thread Alexandre Lockhart
My other question involved formatting my output. Normally, my text file has 8 columns, each column with 500 values before the next 8 below are generated, and so on until 28 are reached. I have examined formatting issues with each function (cbind, sink, apply, trying matrix (only one set is ou

[R] Adding site id to xyplot

2009-06-19 Thread SEUNG CHEON HONG
Dear R Lists, Can anyone help me add site IDs (site: 1~50) directly to my xyplot. I have 50 sites and collected observations from the sites at 13 different time points. I want to look at the change of my observations in each site. I was able to make a graph using xyplot, however, I can't find h

[R] using garchFit() to fit ARMA+GARCH model with exogeneous variables

2009-06-19 Thread Zhang, Yuhan
Hello - Here's what I'm trying to do. I want to fit a time series y with ARMA(1,1) + GARCH(1,1), there are also an exogeneous variable x which I wish to include, so the whole equation looks like: y_t - \phi y_{t-1} = \sigma_t \epsilon_t + \theta \sigma_{t-1} \epsilon_{t-1} + c x_t where \

Re: [R] Splitting Data by Row

2009-06-19 Thread Ross Culloch
OF COURSE Well, i waited until 16:00 before making the first obvious mistake of the day! Despite 4 hours working on the data I just didn't think! You got the question, i just missed the obvious! Thanks very much, & sorry for not noticing that and trying to make life even more complicated

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Tirthankar Chakravarty
You might find the articles of Stephen Stigler interesting: http://www.stat.uchicago.edu/faculty/stigler/pubs.html T On Fri, Jun 19, 2009 at 4:00 PM, Juliet Hannah wrote: > You may find the following two books useful: > > Lehmann, Reminiscences of a Statistician (Springer). > > David Salsburg, Th

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread Uwe Ligges
tbigdeli wrote: I continually receive the error Error in file(file, "r") : cannot open the connection, when running in batch mode, but not when inputing directly into R. Have you given the full path name? If not, do you start both R instances from the same working directory? Otherwise, do

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Juliet Hannah
You may find the following two books useful: Lehmann, Reminiscences of a Statistician (Springer). David Salsburg, The lady testing tea. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide h

Re: [R] Splitting Data by Row

2009-06-19 Thread Uwe Ligges
Ross Culloch wrote: Hello fellow R users! I wonder if someone can help with what i think should be a simple question but i can't seem to find the answer or work it out. My data set is as such: Day Time ID Behaviour 1 9 A1 2 1 10A2 3 .. .... .. 4

[R] Splitting Data by Row

2009-06-19 Thread Ross Culloch
Hello fellow R users! I wonder if someone can help with what i think should be a simple question but i can't seem to find the answer or work it out. My data set is as such: Day Time ID Behaviour 1 9 A1 2 1 10A2 3 .. .... .. 4 10 A1 10 4 1

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Ravi Varadhan
Hi, There is a three-volume series, published by Springer, called "Breakthroughs in Statistics", edited by Kotz and Johnson. Volume 1 is on Foundations and Basic Theory, Volume 2 is on Methodology, and Vol 3 has miscellaneous articles. Ravi. ---

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread onyourmark
Thank you for the posts. I think that from these posts I can say that the '.' will mean that it will draw on all the variables in data other than the one listed as the dependent variable in the formula ('value' in this case). And it will also look in the global workspace (although I am not clear

[R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Michael
Hi all, Sorry for the reposting... I was advised to repost this question with more specific title. I apologize for this off-topic question but I really need your help -- I know there are lots of experts here. As a lover and student of statistics, I am thinking of building a tree of various branch

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread David Winsemius
All of your points are accepted, and I also give you credit for reading the "formula" page better than I. On Jun 19, 2009, at 10:08 AM, Gavin Simpson wrote: On Fri, 2009-06-19 at 09:24 -0400, David Winsemius wrote: On Jun 19, 2009, at 9:00 AM, onyourmark wrote: means and also, I see dat

Re: [R] R: JGR installation errors

2009-06-19 Thread Simon Urbanek
On Jun 19, 2009, at 10:08 , wrote: It works now. Thank you. I even succeeded in starting R by clicking on JGR icon that I placed on my desktop. I wonder whether some Java or system flag that unlocks Mutex (I ignore what it is) has to be set somewhere ... maybe fron the .bashrc file. The

Re: [R] result of rqss

2009-06-19 Thread David Winsemius
If you do a search on the quantreg documentation for "piecewise", the first hit on the pdf has code on the same page. Running that rqss fit call unaltered with your data produced a straight line (because the data only has a domain of 0-0.5) but lowering lambda lets the piecewise character g

Re: [R] Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread Sergey Goriatchev
Dear Gabor and Jim I am not looking at the "recursive" method for filter() Recursive filter with lag 1 is specified in help files as: y[i] = x[i] + f[1]*y[i-1] My function looks like this: EMA[i] = K*(C[i] - EMA[i-1]) + EMA[i-1], that is: y[i]=EMA[i] y[i-1]=EMA[i-1] x[i]=C[i] So, I modified my

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread Gavin Simpson
On Fri, 2009-06-19 at 09:24 -0400, David Winsemius wrote: > On Jun 19, 2009, at 9:00 AM, onyourmark wrote: > > means and also, I see > > > > data=crs$dataset[,c(1:59,922)] > > > > I have read that the data argument is optional here > > "an optional data frame, list or environment (or object coerci

[R] R: JGR installation errors

2009-06-19 Thread mauede
It works now. Thank you. I even succeeded in starting R by clicking on JGR icon that I placed on my desktop. I wonder whether some Java or system flag that unlocks Mutex (I ignore what it is) has to be set somewhere ... maybe fron the .bashrc file. The first time I happened to get JGR running (a

[R] Alternate ways of finding number of occurrence of an element in a vector.

2009-06-19 Thread Praveen Surendran
Hi, I have a vector "v" and would like to find the number of occurrence of element "x" in the same. Is there a way other than, sum(as.integer(v==x)) or length(which(x==v)) to do the this. I have a huge file to process and do this. Both the above described methods are pretty slow w

[R] result of rqss

2009-06-19 Thread Michael Hecht
Hello, i have the following data: x=c(0,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.25,0.26,0.27,0.46,0.47,0.48,0.49) y=c(0.48,0.46,0.41,0.36,0.32,0.35,0.48,0.47,0.55,0.56,0.54,0.67,0.61,0.60,0.54,0.51,0.45,0.42,0.44,0.46,0.41,0.43

Re: [R] Post-Hoc Test for Kruskal-Wallis Rank Sum Test

2009-06-19 Thread Rodrigo Aluizio
Thank you so much Gilles, that is exactly what I’m looking for. Rodrigo. De: LE PAPE Gilles [mailto:lepape.gil...@neuf.fr] Enviada em: sexta-feira, 19 de junho de 2009 10:14 Para: r.alui...@gmail.com Assunto: Post-hoc test Hi Rodrigo, you can use the nparcomp function, library(nparcom

Re: [R] Testing if all elements are equal in a vector/matrix

2009-06-19 Thread utkarshsinghal
How could I miss that... I'm feeling low :( jim holtman wrote: > I have wondered about this way of testing for equality: > > > x <- c(1,0,3,0) > > x[1] * length(x) == sum(x) > [1] TRUE > > x <- rep(1,4) > > x[1] * length(x) == sum(x) > [1] TRUE > This would seem to indicate that both vectors co

Re: [R] How to save multiple images??

2009-06-19 Thread David Winsemius
Give them different names. ?save.image On Jun 19, 2009, at 9:34 AM, Alex Roy wrote: Dear all, How can I save multiple images in my working directory?? I used save.image() but could not succeeded. Thanks in advance Alex David Winsemius, MD Heritage Laboratories West Hartfor

Re: [R] JGR installation errors

2009-06-19 Thread Simon Urbanek
MAura, On Jun 19, 2009, at 7:36 , wrote: I remember JGR installation on SuSE 10.3 as a nightmare that eventually I overcame with JGR designers' help. I have installed SuSE 11.1, latest R version and am trying to install JGR again. It is still a nightmare. Well, good Linux distros offe

Re: [R] off topic but need your pointers about statistics

2009-06-19 Thread Paul Artes
I re-read the posting guide every night before going to bed. The usefulness of this list stems partly from it being a broad church with lots of experts. And my concern wasn't with the "off-topic" label so much as with the slightly inspecific title (although I should have made this clear - mea cul

[R] How to save multiple images??

2009-06-19 Thread Alex Roy
Dear all, How can I save multiple images in my working directory?? I used save.image() but could not succeeded. Thanks in advance Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] overshoot of formula line in summary output of Sweave

2009-06-19 Thread Ben Bolker
Ken Knoblauch wrote: > > Ben Bolker ufl.edu> writes: >> >> > Here is a toy example that illustrates the overshoot of the formula >> >> > \documentclass[12pt]{article} >> >> > \usepackage{geometry} >> >> > \geometry{left=2in,right=2in} >> >> > \begin{document} >> >> > <>= >> >> > op <- options(

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 9:00 AM, onyourmark wrote: I am trying to build a glm model with many inputs. I saw the following code in Rattle crs$glm <- glm(value ~ ., data=crs$dataset[,c(1:59,922)], family=binomial(link="logit")) I am not clear about what value ~ . Generally the "." in a formula i

Re: [R] Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread jim holtman
check out 'filter' to see if it does what you want with the 'recursive' option. On Fri, Jun 19, 2009 at 3:33 AM, Sergey Goriatchev wrote: > Hello, everyone > > I have a long script that uses zoo objects. In this script I used > simple moving averages and these I can very efficiently calculate wit

Re: [R] Manipulate solution of simplex

2009-06-19 Thread Jorge Ivan Velez
Dear Ana, Are you optimizing a linear function? If so, the simplex() function in the boot package (see [1]) is what you are using. Using the example at ?simplex (after loading the boot package): res <- simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, vitz), b2 = c(600, 300, 5

Re: [R] namespace? environment? how to manage functions?

2009-06-19 Thread jim holtman
Here is the way that I do it instead of creating a package of my functions. I 'source' the file into an environment and then attach the environment to keep the global from being clustered: # read my functions into a environment .my.env <- new.env() sys.source('c:/perf/bin/perfmon.r', envir=.my.env

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread Gavin Simpson
On Fri, 2009-06-19 at 06:00 -0700, onyourmark wrote: > I am trying to build a glm model with many inputs. > I saw the following code in Rattle > crs$glm <- glm(value ~ ., data=crs$dataset[,c(1:59,922)], > family=binomial(link="logit")) > > I am not clear about what > > value ~ . From ?formula

[R] batch submit

2009-06-19 Thread Wensui Liu
with emacs + ess, I can do batch submit sas code using m-x submit sas. wondering if I can do so for r or not. -- == WenSui Liu Blog : statcompute.spaces.live.com Tough Times Never Last. But Tough People Do. - Robert Schuller _

  1   2   >