Re: [R] Help with scatterplots in R

2010-07-30 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.07.2010 18:13:57: Hi John, yes, you are right. Here is what I have done: plot(DateJonEnd1, End1Jon, main=Weekly Training at Endurance 1, xlim=c(13700,14750), xlab=Date, ylim=c(0,350), ylab=Volume at Endurance 1, type=b, las=1)

Re: [R] R Equivalent of SAS Datastep Line-Hold (@@) Specifier?

2010-07-30 Thread Joshua Wiley
This gets you to a matrix, though it is messy and you would still have to convert some of the columns from character to numeric, but maybe it will give you an idea. matrix(data = unlist(strsplit(x = readLines(textConnection( A 1 101 M 55 5 A 1 104 F 27 0 A 1 106 M 31 35 A 1 107 F 44 21 A

Re: [R] R Equivalent of SAS Datastep Line-Hold (@@) Specifier?

2010-07-30 Thread Bill.Venables
There is a much simpler way. con - textConnection( A 1 101 M 55 5 A 1 104 F 27 0 A 1 106 M 31 35 A 1 107 F 44 21 A 1 109 M 47 15 A 1 111 F 69 70 A 1 112 F 31 10 A 1 114 F 50 0 A 1 116 M 32 20 A 1 118 F 39 25 A 1 119 F 54 0 A 1 121 M 70 38 A 1 123 F 57 55 A 1 124 M 37 18 A

Re: [R] package xpose4 in Vista - Update

2010-07-30 Thread Santosh
Thanks for your response. How do I install xpose4 package with R.2.11.1? -Santosh 2010/7/29 Uwe Ligges lig...@statistik.tu-dortmund.de The binary package you downloaded is a binary for R 2.11.x. Since it is a package bndle, it cannot work on R-2.11.x anymore: Package bundles are no longer

Re: [R] lm.influence on glm objects

2010-07-30 Thread Xu Wang
Was this issue resolved? -- View this message in context: http://r.789695.n4.nabble.com/lm-influence-on-glm-objects-tp1574781p2307622.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] CBIND / MERGE two time series objects along time (overlapping indices, redundant data)

2010-07-30 Thread Bernhard Von Boyen
Hi there, I need to merge/bind two time series objects (from RPackage: timeSeries) by column. The theory is laid out nicely, even for overlapping indices. In my example, I have overlapping indices (01.01.2001), where in one time series I have one data point and in the other redundant data.

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread mhofert
Okay, great. Thanks. Cheers, Marius -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-higher-derivatives-with-deriv-tp2306711p2307709.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] (no subject)

2010-07-30 Thread Natasa Tzortzaki
hello, i am new to R and trying to calculate the beta coefficient for standard linear regression for a series of randomly generated numbers. I have created this loop, but it runs really slow, is there a way to improve it? #number of simulations n.k-999 #create the matrix for regression

[R] Need a help to plot bar for time series Rain data

2010-07-30 Thread Nyanzura
Hey Guys, I am quite new to R, am trying to plot a bar plot for my monthly rainfall data from 1920 to 1990. For every year I have the data from January to December. I have created this code: data-read.table(C://R//Data//Rain.txt, header=TRUE) data-data[,2:13] Rdata-data[1,] for(i in

Re: [R] package xpose4 in Vista - Update

2010-07-30 Thread Uwe Ligges
On 30.07.2010 08:56, Santosh wrote: Thanks for your response. How do I install xpose4 package with R.2.11.1? Only by unbundling it manually and installing the separate packages from sources afterwards. I highly suggest to contact the maintainers. Uwe -Santosh 2010/7/29 Uwe Ligges

Re: [R] reading dates in Excel into R

2010-07-30 Thread 500600
Does function ?strptime help you in any way? -- View this message in context: http://r.789695.n4.nabble.com/reading-dates-in-Excel-into-R-tp2306830p2307744.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Sweave line breaks

2010-07-30 Thread soeren . vogel
Hello, when I print x in Sweave, the lines do not wrap. However, I want them to wrap (perhaps at a specified width). How? Thanks, *S* keep.source=TRUE= x - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad

Re: [R] reading dates in Excel into R

2010-07-30 Thread John C Frain
To read the data into R 1) I format my dates as -MM-DD in Excel (or OpenOffice Calc), 2) (change =na() to NA) 3) Check that required number of significant decimal places are displayed, 4) export as csv and 5) Use readSeries() function from Rmetrics timeSeries package to read the data into R.

Re: [R] Out-of-sample predictions with boosting model

2010-07-30 Thread Benjamin Hofner
Hi Travis, I try to give you some hints that might bring you closer to a solution. The clue to your problem (as far as I understand it) might just be to appropriately use the predict function of mboost. You can specify a new data set (e.g. a part of your original data set not used for

Re: [R] adding new devices and plots

2010-07-30 Thread Jim Lemon
On 07/30/2010 04:15 AM, Erin Hodgess wrote: Dear R People: I have the following function: eplot function (x) { plot(x) z- locator(2) dev.new() plot(window(x, start = min(z$x), end = max(z$x))) } I want to generate a new plot from a subset of the original, but I want

Re: [R] a Chebyshev ....really important

2010-07-30 Thread Liviu Andronic
On Thu, 29 Jul 2010 19:01:52 -0400 hussain abu-saaq hussain...@hotmail.com wrote: Hi. i have one question. is there any command to use a Chebyshev in R. i need them to fit the data and get a Chebyshev polynomial. thank you. Please try

[R] Flip axis on hist2d plot

2010-07-30 Thread Ralf B
I am plotting a heatmap using the hist2d function: require(gplots) x - rnorm(2000) y - rnorm(2000) hist2d(x, y, freq=TRUE, nbins=50, col = c(white,heat.colors(256))) However, I would like to flip the vertical y axis so that the upper left corner serves as the y-origin. How can I do that? Ralf

Re: [R] multiple graphics windows open with sessionInfo

2010-07-30 Thread Uwe Ligges
On 29.07.2010 23:29, Erin Hodgess wrote: Dear R People: Hello again. I'm trying to have 3 graphics windows visible simultaneously. I set up a zoo series. Then I plot the original series. I use the locator function to select 2 values from the original series, which generates a subset of the

Re: [R] Need a help to plot bar for time series Rain data

2010-07-30 Thread Jim Lemon
On 07/30/2010 06:51 PM, Nyanzura wrote: Hey Guys, I am quite new to R, am trying to plot a bar plot for my monthly rainfall data from 1920 to 1990. For every year I have the data from January to December. I have created this code: data-read.table(C://R//Data//Rain.txt, header=TRUE)

Re: [R] Need a help to plot bar for time series Rain data

2010-07-30 Thread Nyanzura
Hi Jim, Thank you very much, let me check as you suggested. But in addition what do you think could be easy to interpret? Could you advice me please. Nyanzura -- View this message in context:

Re: [R] 3d topographic map

2010-07-30 Thread Karl Ove Hufthammer
sh...@ucar.edu wrote: I would like to create a 3d topographic map using lat/lon and z(height). I have been scouring the R help pages and have not located the package I am looking for. Does anyone have a suggestion of package that will work for this? I have some code for generating some

[R] Programming Statistical Functions

2010-07-30 Thread hector
Hello, I'm new in R. I'm meteorological modeller and i will calculate some statistics for my model results. These statistis are the follow: ANB: Average Normalized Absolute BIAS MNB: Mean Normalized BIAS MNE: Mean Normalised Error STDE: Standard Deviation of Error FB: Fractional BIAS MG:

Re: [R] super class

2010-07-30 Thread Arun.stat
Is this what you wanted? setClass(class1, representation(xc1=numeric, xc2=character)) setClass(class2, representation(cx1=character, cx2=numeric)) setClassUnion(combinedClass, c(class1,class2)) getClass(combinedClass) -- View this message in context:

Re: [R] Programming Statistical Functions

2010-07-30 Thread stephen sefick
Maybe and r site search would help? Try and figure out how to calculate these yourself. If you need help send a minimal, reproducible example to this list, and you will probably recieve help. If you need a starting place for programming functions look at an introduction to R. #coefficient of

Re: [R] (no subject)

2010-07-30 Thread Dennis Murphy
Hi: Avoiding loops in R by using vectorization is usually one of the best ways to improve performance. Since we can't replicate your data (e.g., tslength is not given), instead I'll generate a couple of functions to extract the estimated beta from randomly generated data. The replicate() function

Re: [R] Need a help to plot bar for time series Rain data

2010-07-30 Thread Jim Lemon
On 07/30/2010 09:24 PM, Nyanzura wrote: Hi Jim, Thank you very much, let me check as you suggested. But in addition what do you think could be easy to interpret? Could you advice me please. I would probably start with: plot(times,type=l,...) if you can makes 'times' into a vector. Jim

Re: [R] Sweave line breaks

2010-07-30 Thread Marc Schwartz
On Jul 30, 2010, at 4:13 AM, soeren.vo...@eawag.ch wrote: Hello, when I print x in Sweave, the lines do not wrap. However, I want them to wrap (perhaps at a specified width). How? Thanks, *S* keep.source=TRUE= x - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

Re: [R] Data Handling

2010-07-30 Thread Lily_stats
Hi, I am trying to convert my dataset into xts. I have tried the following : data1-read.table(data1.txt,header=F) data2-read.table(data2.txt,header=F) data1.xtsas.xts(data1,descr=my new xts object) However, I get an error : Error in as.POSIXlt.character(x, tz, ...) : character string is

Re: [R] Ouput several lines of cat

2010-07-30 Thread Wu Gong
Hi, set sep=\n x - c(X XXX,X XX.XX,- ( XX.XX XXX ) ) cat(x,file=x.txt,sep=\n) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Ouput-several-lines-of-cat-tp2307900p2307945.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Data Handling

2010-07-30 Thread Gabor Grothendieck
On Fri, Jul 30, 2010 at 9:02 AM, Lily_stats sund...@gmail.com wrote: Hi, I am trying to convert my dataset into xts. I have tried the following : data1-read.table(data1.txt,header=F) data2-read.table(data2.txt,header=F) data1.xtsas.xts(data1,descr=my new xts object) However, I get an

[R] simple table/matrix problem

2010-07-30 Thread Robin Hankin
Hi Given three vectors x - c(fish=3, dogs=5, bats=2) y - c(dogs=1, hogs=3) z - c(bats=3, dogs=5) How do I create a multi-way table like the following? out x y z bats 2 0 3 dogs 5 1 5 fish 3 0 0 hogs 0 3 0 ('out' is a matrix). See how the first line shows 'x' has 2 bats, 'y' has

Re: [R] simple table/matrix problem

2010-07-30 Thread Henrique Dallazuanna
Try this: Reduce(function(...)merge(..., by = 'ind', all = TRUE), lapply(list(x, y, z), stack)) On Fri, Jul 30, 2010 at 10:39 AM, Robin Hankin rk...@cam.ac.uk wrote: Hi Given three vectors x - c(fish=3, dogs=5, bats=2) y - c(dogs=1, hogs=3) z - c(bats=3, dogs=5) How do I create a

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread peter dalgaard
On Jul 29, 2010, at 11:27 PM, Wu Gong wrote: ## specify the function string f.str - x^alpha ## higher derivatives DD - function(f.str, x = 2, alpha=3,order = 1){ expr.s - parse(text=f.str) while(order=1) { expr.s - D(expr.s,x) order - order-1} eval(expr.s) } compute

[R] bonjour

2010-07-30 Thread aline uwimana
Bonjour, je suis une étudiante en épidémiologie. j'utilise R pour mes analyses, et un souci dans le calcul de l'AIC,BIC, et je pense calcul la déviance puis à partir de là calculer ces informations manuellement mais j'ai trouvé quelque chose et je ne suis pas très si c'est la déviance que j'ai

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread Ravi Varadhan
I am not as lazy as Peter (but neither am I as good as him)! So, please allow me to take a stab at completing his exercise: Deriv - function(fn, order=1) { ddf - fn body(ddf) - D(body(f),x) if (order 1) { for (i in 2:order) { body(ddf) - D(body(ddf),x) }

[R] help for creating arff file..i have the codes??

2010-07-30 Thread Mete
I need to create an arff file.i have the necesaary codes as two parts and i need to combine them..if there is anyone who can help i'll send the codes..thank you. -- View this message in context: http://r.789695.n4.nabble.com/help-for-creating-arff-file-i-have-the-codes-tp2308039p2308039.html

Re: [R] bonjour

2010-07-30 Thread aline uwimana
Thanx Ivan, first of all, my english is power but i will try . my question is about the calculation of AIC, BIC by using svyglm in order to choose the best model in multiple regression. thanx Le 30 juillet 2010 16:17, Ivan Calandra ivan.calan...@uni-hamburg.de a écrit : Salut, Commence

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread peter dalgaard
On Jul 30, 2010, at 4:28 PM, Ravi Varadhan wrote: I am not as lazy as Peter (but neither am I as good as him)! So, please allow me to take a stab at completing his exercise: Deriv - function(fn, order=1) { ddf - fn body(ddf) - D(body(f),x) ### Typo: body(ddf) or body(fn) if (order 1)

[R] COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread Biau David
Hello, I would like to get the likelihood ratio and score tests for specific variables in a multivariate coxph model. The default is Wald, so the tests for each separate variable is based on Wald's test. I have the other tests for the full model but I don't know how to get them for each

Re: [R] hi! l have a question please help me

2010-07-30 Thread Tal Galili
Is this a question from your homework? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Out-of-sample predictions with boosting model

2010-07-30 Thread TravisB
Thanks, Ben. Specifying the data in this way should give me what I need - I can do this in a loop fairly easily and wind up with what I want in the end. And I should've been more specific, I think that mboost can handle time-series data, it's the fact that the data is a panel bit that was giving

Re: [R] logos and goodies

2010-07-30 Thread Tal Galili
Interesting topic and question. I hope someone who knows will answer this. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

[R] Next release of R planned to be 2.12.0

2010-07-30 Thread Peter Dalgaard
This mainly as a thumbs-up to sysadmins planning installation for the Fall semester: Only a small number of low-impact bugs have been found since the 2.11.1 release so we have decided NOT to do a 2.11.2, but head straight for 2.12.0 some time in October. For the R Core Team Peter Dalgaard

Re: [R] COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread David Winsemius
On Jul 30, 2010, at 11:08 AM, Biau David wrote: Hello, I would like to get the likelihood ratio and score tests for specific variables in a multivariate coxph model. The default is Wald, so the tests for each separate variable is based on Wald's test. I have the other tests for the full

Re: [R] logos and goodies

2010-07-30 Thread peter dalgaard
On Jul 30, 2010, at 4:06 AM, c...@witthoft.com wrote: I've got a couple questions related to my search (in vain) for an R tshirt or coffee mug. The first question is simply: is there a higher-resolution R logo available than the one at r-developer.org? (or the modified one

[R] Re : COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread Biau David
Thx for the answer. I am using survival. I didn't know that the Wald and score tests were the same for individual variables in a coxph; I Thought the score test was the multivariate version of the Log-rank. However, say I have only one variable in the model, I should expect the test for

Re: [R] how to get higher derivatives with deriv

2010-07-30 Thread Wu Gong
Hi Peter, Here is my homework :) DD - function(f,order=1){ f.str - body(f) while(order=1) { f.str - paste('D(',f.str,',x)',sep=) order - order-1} ddf - f body(ddf) - eval(parse(text=f.str)) ddf} f - function(x,alpha) x^alpha DD(f)(2,3) g

[R] Need to read an Excel File

2010-07-30 Thread rajibshibly
I am trying to read an Excel file using the following: a-read.xls(mydata.xls, sheet=1) The file mydata.xls is stored in the working directory. However I am getting the following error. Can anyone help. Error in findPerl(verbose = verbose) : perl executable not found. Use perl= argument to

[R] Ouput several lines of cat

2010-07-30 Thread rajibshibly
Hello, I am brand new to R. I need to know how to output the contents of cat function into a text file. The cat is used to output several lines of string in the following format: X XXX X XX.XX - ( XX.XX XXX ) I need to get the output of all these lines into a text file. I tried to put

Re: [R] (no subject)

2010-07-30 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Natasa Tzortzaki Sent: Friday, July 30, 2010 1:19 AM To: r-help@r-project.org Subject: [R] (no subject) hello, i am new to R and trying to calculate the beta coefficient

[R] Data Handling

2010-07-30 Thread Lily_stats
Hi, I am very new to R so these questions may seem simple! I have a huge 2 sets of data(matrix 5x2++) in the following formats , for example data.txt and data2.txt: Date Time X Y 03/03/1983 20:00 0.1 990 I would like to recreate

[R] Reading .eps file created in Illustrator

2010-07-30 Thread Patrick Schorderet
Hello, I am trying to import an .eps file created with Adobe Illustrator and plot it in a Quartz window (I am using R 2.11.1 GUI 1.34 Leopard build 32-bit (5589) on MacOSx.5.8). I thought of using the PostScriptTrace() to convert my .eps file to RGML, and then use readPicture to plot the

[R] Having problem to define a subclass, please help me

2010-07-30 Thread Megh Dal
Here I am having problem to define a subclass, specially if I define that subclass after defining initialize() method for its superclass. Here is my code: setClass(a, representation=list(x=numeric, y=numeric), prototype=list(x=rnorm(10), y=rnorm(10))) [1] a setMethod(initialize, a,

[R] finding a function or a line while debugging?

2010-07-30 Thread Raghu
guRus Is there a way by which I can search for a particular function or a particular line of code within the maze of all the R codes that are interlinked? Say for instance I am running a code using quantstrat package and on a particular line I get the error saying x is missing in is.array(x). I

Re: [R] Data Handling

2010-07-30 Thread raghu
Convert your datasets into xts objects and then do a cbind ordering by the column you want. Do a ?cbind. HTH Raghu On Fri, Jul 30, 2010 at 10:33 AM, Lily_stats [via R] ml-node+2307770-1033893256-309...@n4.nabble.comml-node%2b2307770-1033893256-309...@n4.nabble.com wrote: Hi, I am very new

Re: [R] Data Handling

2010-07-30 Thread raghu
Please try: data - xts(data[,2:n], order.by=as.POSIXct(strptime(data[,1], %d/%m/%Y))) Use similar strptime for hours also.n=number of columns. Good Luck Raghu On Fri, Jul 30, 2010 at 2:02 PM, Lily_stats [via R]

[R] Computation of largest eigenvalue

2010-07-30 Thread Christian Weiß
Hello, I am looking for an R function to compute only the largest eigenvalue (Perron-Frobenius eigenvalue) and its corresponding eigenvector of a square matrix (in fact, even only of a non-negative matrix). The function should also be able to deal with very large but sparse matrices. Any

[R] creation package

2010-07-30 Thread anderson nuel
Dear r-help, I create a package. When I installed this package (I use this command : R CMD check namepackage),I find an error: * checking whether package 'namepackage' can be installed ... ERROR Installation failed. Could you help me to find solution for this error. Best Regards

[R] ColSideColor width in heatmap.2

2010-07-30 Thread Poetsch Anna
Dear R users, I am trying to add a ColSideColor- bar to a heatmap created with heatmap.2. I had to adjust the width of the heatmap, for which I used asp = 0.8. Now the ColSideColor- Bar does not fit to the width of the heatmap anymore. Does anyone have an idea, how I can adjust the width of the

Re: [R] R Equivalent of SAS Datastep Line-Hold (@@) Specifier?

2010-07-30 Thread Paul Miller
Hello Dr. Venables and Joshua,   Thank you for your replies to my post. Dr. Venables's solution is particularly elegant. I looked at the the help file for scan() and it seems pretty clear how this works. Two arguments (file= and what=) are submitted to the function. These are specified in order

Re: [R] simple table/matrix problem

2010-07-30 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Robin Hankin Sent: Friday, July 30, 2010 6:40 AM To: r-help@r-project.org Subject: [R] simple table/matrix problem

[R] Using R for Multiple Regression

2010-07-30 Thread Ambikesh Jayal
Hi, Subject: Using R for Multiple Regression I am new to statistic but am interested in applying mathematical models to solve biological problems. I have used a linear model to generate the test data. When using this data I expect R to correctly identify the model but that does not seem to be

Re: [R] multiple graphics windows open

2010-07-30 Thread Tal Galili
Hi Erin, Could you please add a simple self contained code for us to try and help you with? (giving us code with doesn't help) Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] hi! l have a question please help me

2010-07-30 Thread leepama
yes!! I join group study that study R-programming... so I really tried..only to fail and made many erros.. I really don't know how to perform this... -- View this message in context: http://r.789695.n4.nabble.com/hi-l-have-a-question-please-help-me-tp2307569p2308091.html Sent from the R

Re: [R] finding a function or a line while debugging?

2010-07-30 Thread Duncan Murdoch
On 30/07/2010 8:04 AM, Raghu wrote: guRus Is there a way by which I can search for a particular function or a particular line of code within the maze of all the R codes that are interlinked? Say for instance I am running a code using quantstrat package and on a particular line I get the error

Re: [R] Need to read an Excel File

2010-07-30 Thread Gabor Grothendieck
On Fri, Jul 30, 2010 at 8:39 AM, rajibshibly rajibshi...@yahoo.com wrote: I am trying to read an Excel file using the following: a-read.xls(mydata.xls, sheet=1) The file mydata.xls is stored in the working directory. However I am getting the following error. Can anyone help. Error in

[R] standard error for predicted mean count from ZIP

2010-07-30 Thread Brian S Cade
Does anyone have code for computing the standard error of the predicted mean count from a zero-inflated Poisson regression model estimated by the zeroinfl() function from the pscl package (and yes, we've checked with A. Z. already)? Thank you Brian Brian S. Cade, PhD U. S. Geological Survey

Re: [R] finding a function or a line while debugging?

2010-07-30 Thread Duncan Murdoch
On 30/07/2010 8:04 AM, Raghu wrote: guRus Is there a way by which I can search for a particular function or a particular line of code within the maze of all the R codes that are interlinked? Say for instance I am running a code using quantstrat package and on a particular line I get the error

Re: [R] Ouput several lines of cat

2010-07-30 Thread Ted Harding
On 30-Jul-10 12:20:35, rajibshibly wrote: Hello, I am brand new to R. I need to know how to output the contents of cat function into a text file. The cat is used to output several lines of string in the following format: X XXX X XX.XX - ( XX.XX XXX ) I need to get the output

[R] problems about dynamic GMM

2010-07-30 Thread 97258031
Dear all, I am a new user of R, and I would like to use R to estimate dynamaic GMM of Arellano and Bond (1991). The package I used is plm and its code pgmm. However, the regression cannot run and it showed an error message: Error in solve.default(Reduce(+, A2)) : system is computationally

Re: [R] Re : COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread David Winsemius
On Jul 30, 2010, at 11:53 AM, Biau David wrote: Thx for the answer. I am using survival. I didn't know that the Wald and score tests were the same for individual variables in a coxph; I Thought the score test was the multivariate version of the Log-rank. However, say I have only one

Re: [R] hi! l have a question please help me

2010-07-30 Thread Tal Galili
Then please read this: http://www.r-project.org/posting-guide.html *Basic statistics and classroom homework:* R-help is not intended for these. If you want learning materials for R you can check out: http://stats.stackexchange.com/questions/138/resources-for-learning-r And:

Re: [R] newton.method

2010-07-30 Thread Prof. John C Nash
Sometimes it is easier to just write it. See below. On 10-07-30 06:00 AM, r-help-requ...@r-project.org wrote: Date: Thu, 29 Jul 2010 11:15:05 -0700 (PDT) From: sammynysj...@caa.columbia.edu To:r-help@r-project.org Subject: Re: [R] newton.method

Re: [R] Computation of largest eigenvalue

2010-07-30 Thread Ravi Varadhan
There is the arpack() function in igraph package for computing leading eigenvalues, but I am not sure how well it can handle very large matrices. I have coded up an accelerated power method and have used it on dense matrices of order 5000. It takes around 9-10 secs for the dominant eigenvalue

Re: [R] Re : COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread Therneau, Terry M., Ph.D.
The Wald, score, and LR tests are discussed in full in my book. They are not the same. The LR test is the difference between LR(beta=0) and LR(beta=final). The score test is a Taylor series approximation to this using an expansion around beta=0. The Wald test is a similar Taylor series

[R] Formatting datetime data for gantt.chart.

2010-07-30 Thread Andrew Noyes
Overall goal: I'd like to have a visual representation of when certain computer applications are running over the course of a day (data will come from a SQL query later, but I'm using a csv for now). My idea is to use a gantt chart, but I'm running into issues with the start and end time. I'm

Re: [R] reading dates in Excel into R

2010-07-30 Thread Hongying Li
I just do not want the dates format change randomly (seems to me) each time I read it from excel2007 file into R. When I export the excel2007 fiel into csv file and use read.csv function then the dates all come out good (as mm/dd/ in csv file). I guess I have to first import into csv file

[R] R on Mac OS X 10.6 freezing up

2010-07-30 Thread Jesse Poland
I am running R and R64 on a MacBook Pro (2.66GHz, 8GB, OS X 10.6) and it keeps freezing up on me (i.e. have to force quit or kill). Same problem with both R and R64. I am not doing heavy computation, mostly just editing some scripts in the GUI. Also the computer is plenty fast with

Re: [R] (no subject)

2010-07-30 Thread Gray Calhoun
On Fri, Jul 30, 2010 at 4:59 AM, Daniel Nordlund djnordl...@verizon.net wrote: You haven't provided a reproducible example, so I am going to guess at some of what you are doing.  You also have used some function names for your variable names which I like to avoid, so I have used 'b' as the

[R] Re : Re : COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?

2010-07-30 Thread Biau David
Well thank you very much for these explanations. Unfortunately, I must admit the book I have for survival analysis seems less precise as to which test to use and why. Still, in coxph (survival), if I have multiple variables in a model, say X_1, X_2, and X_3, how do I test their respective

Re: [R] R on Mac OS X 10.6 freezing up

2010-07-30 Thread Peter Dalgaard
Jesse Poland wrote: I am running R and R64 on a MacBook Pro (2.66GHz, 8GB, OS X 10.6) and it keeps freezing up on me (i.e. have to force quit or kill). Same problem with both R and R64. I am not doing heavy computation, mostly just editing some scripts in the GUI. Also the computer is

[R] Summing by index

2010-07-30 Thread steven mosher
# build a sample data frame illustrating the problem ids-c(rep(1234,5),rep(5436,3),rep(7864,4)) years-c(seq(1990,1994,by=1),seq(1991,1993,by=1),seq(1990,1993,by=1)) data-seq(14,25,by=1) data[6]-NA DF-data.frame(Id=ids,Year=years,Data=data) DF Id Year Data 1 1234 1990 14 2 1234 1991

Re: [R] Summing by index

2010-07-30 Thread David Winsemius
On Jul 30, 2010, at 2:41 PM, steven mosher wrote: # build a sample data frame illustrating the problem ids-c(rep(1234,5),rep(5436,3),rep(7864,4)) years-c(seq(1990,1994,by=1),seq(1991,1993,by=1),seq(1990,1993,by=1)) data-seq(14,25,by=1) data[6]-NA DF-data.frame(Id=ids,Year=years,Data=data) DF

Re: [R] Summing by index

2010-07-30 Thread steven mosher
ha. that was a stupid mistake. Thanks. On Fri, Jul 30, 2010 at 11:46 AM, David Winsemius dwinsem...@comcast.netwrote: On Jul 30, 2010, at 2:41 PM, steven mosher wrote: # build a sample data frame illustrating the problem ids-c(rep(1234,5),rep(5436,3),rep(7864,4))

[R] Layering multiple persp plots

2010-07-30 Thread Ian Bentley
Hi all, I've got two persp plots with Identical X and Y's, and I'd like to plot them on the same graph, so that it is obvious where one plot is above the other. I can't find any mention of this anywhere. Do I need to use wireframe? Any help is appreciated. Thanks, -- Ian Bentley M.Sc.

Re: [R] Summing by index

2010-07-30 Thread steven mosher
Thanks again david. To finish out the example. DF Id Year Data 1 1234 1990 14 2 1234 1991 15 3 1234 1992 16 4 1234 1993 17 5 1234 1994 18 6 5436 1991 NA 7 5436 1992 20 8 5436 1993 21 9 7864 1990 22 10 7864 1991 23 11 7864 1992 24 12 7864 1993 25

Re: [R] hi! l have a question please help me

2010-07-30 Thread leepama
hey!!! this is not classroom homework!! To do main programming, I find some good training problems in paper... I tried to do that...but failed so please help me Nobody help me...I relly don't know how to perform this... If you solve this probelm,I will study your work to solve main

Re: [R] Summing by index

2010-07-30 Thread Wu Gong
Hi, R has a buildin function ?rowsum rowsum(DF$Data,DF$Id,na.rm=T) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Summing-by-index-tp2308332p2308411.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Layering multiple persp plots

2010-07-30 Thread Duncan Murdoch
On 30/07/2010 1:22 PM, Ian Bentley wrote: Hi all, I've got two persp plots with Identical X and Y's, and I'd like to plot them on the same graph, so that it is obvious where one plot is above the other. I can't find any mention of this anywhere. Do I need to use wireframe? persp() can't

Re: [R] reading dates in Excel into R

2010-07-30 Thread Gabor Grothendieck
On Fri, Jul 30, 2010 at 1:17 PM, Hongying Li colorl...@hotmail.com wrote:  I just do not want the dates format change randomly (seems to me) each time I read it from excel2007 file into R. When I export the excel2007 fiel into csv file and use read.csv function then the dates all come out

Re: [R] newton.method

2010-07-30 Thread sammyny
I have written versions of these in C++ but my point is to learn R and discover all these methods in it. thanks On Fri, Jul 30, 2010 at 12:55 PM, Prof. John C Nash [via R] ml-node+2308224-1876059272-368...@n4.nabble.comml-node%2b2308224-1876059272-368...@n4.nabble.com wrote: Sometimes it is

[R] Using data frame col names and variables

2010-07-30 Thread Cadmium 2
Hi to you all! I'm new to R and to this mailing list, so do please excuse me if my question sounds stupid. Currently I'm working with a data frame called results. In each column of results I have a set of results for different experiments (all results are numerical) realized in different

[R] Fw: Having problem to define a subclass, please help me

2010-07-30 Thread Megh Dal
Dear all, apart from my previous question, I would also like to ask one more question here, which is as follows: #let me 1st define a class and a subclass setClass(a, representation=list(x=numeric, y=numeric), prototype=list(x=rep(1,3),y=rep(2,3))) setClass(b, representation=list(x1=character,

[R] Problem with par and bubble plot

2010-07-30 Thread Filoche
Hi all. I have been trying to plot 9 bubble plots on each page of a PDF file. For this, I'm using : par(mfcol = c(3,3), mar = c(3,3,3,3), oma = c(0,0,0,0)); However, when plotting the bubble plot (gstats package), it plots the graph on a full page. I tried to plot something else with

Re: [R] Using data frame col names and variables

2010-07-30 Thread David Winsemius
On Jul 30, 2010, at 2:12 PM, Cadmium 2 wrote: Hi to you all! I'm new to R and to this mailing list, so do please excuse me if my question sounds stupid. Currently I'm working with a data frame called results. In each column of results I have a set of results for different experiments

Re: [R] svydesign syntax

2010-07-30 Thread Thomas Lumley
On Thu, 22 Jul 2010, R user wrote: This message is for those familiar with the survey package. I need to fit a weighted Cox model to accommodate the sampling weights as I have a case-control study with controls sampled at random from a database in a ratio 2:1 to cases (whom were all sampled). I

Re: [R] reading dates in Excel into R

2010-07-30 Thread Dimitri Liakhovitski
I've wasted a lot of time trying to read in dates from Excel. Even importing .csv files has not guarantees and often produces garbage instead of dates. What I found works best is saving the Excel data base as a tab-delimited file .txt (after having formatted the dates in the format you need, e.g.,

Re: [R] reading dates in Excel into R

2010-07-30 Thread Gray Calhoun
Hi Hongying, There is a manual on the R website about data import and export that explains different options. --Gray On 7/30/10, Hongying Li colorl...@hotmail.com wrote: I just do not want the dates format change randomly (seems to me) each time I read it from excel2007 file into R. When I

[R] Fw: Re: R statical-script for analysis (India)

2010-07-30 Thread Nilesh Vaghela
Nilesh M. Vaghela Research Scholar c/o Prof. N. V. Sastry, Department of Chemistry, Sardar Patel University Vallabhvidyanagar-388 120 Gujarat, India --- On Thu, 29/7/10, Kurt Hornik kurt.hor...@wu.ac.at wrote: From: Kurt Hornik kurt.hor...@wu.ac.at Subject: Re: R statical-script for analysis

[R] conditonal if

2010-07-30 Thread putri wikie
Hi, I have problem with my R program. Actually, it just a simple program, but I do not know the error is. Here is part of my program: if (tau2ca==0) {MVvc - 0.01} else {MVvc - tau2ca} ri_vc - si2/MVvc vi_vc - ri_vc + 1 Y_bar_vc - sum(y/vi_vc)/sum((1/vi_vc)) tau2MVvc - sum((1/vi_vc)*(y -

  1   2   >