### [R] simulation

Hello I would like to simulate datasets in the following way: x - rpois(999, 2000) y - sum(exp(rgamma(x, scale=2, shape=0.5))) The problem is, that by calling y I just get 1 value back and not 999 values. Can anyone help me? Thanks! Brigitte [[alternative HTML version

### Re: [R] bivariate normal distribution in likelihood

On Tue, 1 May 2007, Robert A LaBudde wrote: At 11:32 PM 4/30/2007, Deepankar wrote: Hi all, I am trying to do a maximum likelihood estimation. In my likelihood function, I have to evaluate a double integral of the bivariate normal density over a subset of the points of the plane. For

### Re: [R] Perpendicular symbol in plotmath?

That's fantastic, guys! Thank you very much. Paul's solution will definitely suffice until the perpendicular symbol is implemented in plotmath. -Matt On 1 May 2007, at 00:40, Paul Murrell wrote: Hi Matthew Neilson wrote: Thanks for your response, Gabor. That works quite nicely. The

### [R] Odp: simulation

Hi [EMAIL PROTECTED] napsal dne 01.05.2007 09:03:46: Hello I would like to simulate datasets in the following way: x - rpois(999, 2000) y - sum(exp(rgamma(x, scale=2, shape=0.5))) You computed sum of your 999 values. Regardless of how many values are summed the result is always only

### Re: [R] simulation

maybe you're looking for something like this: x - rpois(999, 2000) y - numeric(length(x)) for (i in seq_along(x)) y[i] - sum(exp(rgamma(x[i], scale = 2, shape = 0.5))) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health

### Re: [R] thousand separator (was RE: weight)

Liaw, Andy wrote: Looks very neat, Gabor! I just cannot fathom why anyone who want to write numerics with those separators in a flat file. That's usually not for human consumption, and computers don't need those separators! Andy The world is stranger than you think... (One of my

### Re: [R] bivariate normal distribution in likelihood

Robert A LaBudde wrote: At 11:32 PM 4/30/2007, Deepankar wrote: Hi all, I am trying to do a maximum likelihood estimation. In my likelihood function, I have to evaluate a double integral of the bivariate normal density over a subset of the points of the plane. For instance, if I

### Re: [R] simulation

Dimitris Rizopoulos wrote: maybe you're looking for something like this: x - rpois(999, 2000) y - numeric(length(x)) for (i in seq_along(x)) y[i] - sum(exp(rgamma(x[i], scale = 2, shape = 0.5))) Or use sapply, sapply(x, function(x) sum(exp(rgamma(x[i], scale = 2, shape = 0.5)) )

### Re: [R] simulation

Thats exactly what I am looking for! Thanks for your help! -Ursprüngliche Nachricht- Von: Peter Dalgaard [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 1. Mai 2007 11:46 An: Dimitris Rizopoulos Cc: Thür Brigitte; r-help@stat.math.ethz.ch Betreff: Re: [R] simulation Dimitris Rizopoulos

### Re: [R] impossible to open SPSS file

David Barron gave me a good tip that I had not seen: Have a look at FAQ 2.16 in the R for Windows FAQ. Knut Krueger wrote: My workaround for that problem is to build the data sheet in Excel and import it to SPSS and R. Or to export the SPSS sheet to CSV (or maybe if it is possible to

### [R] Problem with the installation of install R on Sun Solaris

This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by R configure 2.4.1, which was generated by GNU Autoconf 2.59. Invocation command line was $ ./configure ## - ## ## Platform. ## ## -

### Re: [R] Concepts question: environment, frame, search path

On 01/05/2007 12:29 AM, Graham Wideman wrote: Folks: I'd appreciate if someone could straighten me out on a few concepts which are described a bit ambiguously in the docs. 1. data.frame: Refan p84: 'A data frame is a list of variables of the same length with unique

### [R] adding column to a matrix

l have the following dataset and would like to calculate the actual survival time by if censoring time survival time then actual survival time =survival time else its= censoring time. treatmentgrp strata censoringTimesurvivalTime censoring actualsurvivaltim [1,]

### Re: [R] intersect filled.contour and polygon

On Mon, 30 Apr 2007, Pedro Mardones wrote: Dear R users; Is there any way to intersect a filled contour image and a polygon? My problem is that I want to create a kriging map and the boundaries of my map are given by the coordinates of the polygon. So far I can superompose the polygon in

### Re: [R] to draw a smooth arc

Paulo Barata wrote: Dear R-list members, I would like to draw a smooth arc. I can draw an arc parametrically, but this produces an arc too coarse, even allowing for different increments in sequence t in the example below. Function symbols (graphics) does produce a smooth circle, but it

### [R] Odp: adding column to a matrix

Hi see ?ifelse ifelse(censoringsurvival, survival, censoring) Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 01.05.2007 13:25:18: l have the following dataset and would like to calculate the actual survival time by if censoring time survival time then actual survival time

### Re: [R] to draw a smooth arc

On Tue, 1 May 2007, Jim Lemon wrote: Paulo Barata wrote: Dear R-list members, I would like to draw a smooth arc. I can draw an arc parametrically, but this produces an arc too coarse, even allowing for different increments in sequence t in the example below. Function symbols (graphics)

### Re: [R] Independent contrasts from lme with interactions

Ken, Take a look at the just released contrast package. Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Nussear Sent: Monday, April 30, 2007 6:12 PM To: r-help@stat.math.ethz.ch Subject: [R] Independent contrasts from lme with interactions Hi

### Re: [R] Problem with the installation of install R on Sun Solaris

R has a file INSTALL which asks you to read R-admin.html if you have a problem. That manual explains that you need a C (preferably C99) and a Fortran compiler. This extensive posting merely says that you don't have a C compiler in your path. That's not something we can help you with. (Lots

### Re: [R] thousand separator (was RE: weight)

--- Liaw, Andy [EMAIL PROTECTED] wrote: Looks very neat, Gabor! I just cannot fathom why anyone who want to write numerics with those separators in a flat file. That's usually not for human consumption, and computers don't need those separators! Andy It' often a case of taking

### Re: [R] Problem with the installation of install R on Sun Solaris

Greetings. It looks like your R config can't find your C compiler. Do you have / usr/ccs/bin in your path? Or, if you installed Studio 11, do you have /usr/ccs/bin and /opt/SUNWspro/bin in your path? Hope this helps, Jon __ R-help@stat.math.ethz.ch

### Re: [R] Problem with the installation of install R on Sun Solaris

Vipin Singhal wrote: (nothing, except for an attached file) configure:3749: checking for gcc configure:3778: result: no configure:3829: checking for cc configure:3858: result: no configure:3871: checking for cc configure:3917: result: no configure:3970: checking for cl configure:3999: result: no

### Re: [R] to draw a smooth arc

This thread prompts me to ask about something I've been pondering for a while, as to whether there's an implementation somewhere ticked away in the R resources. So far, people have been responding to the original query in terms of increasing the numbers of points, and joining these by lines.

### [R] Polar graph of time and tide

I have been trying to visualize times of lowest tides, month by month. I have tide predictions with times either in unix time or a text format, and heights in feet or meters. I had been able to derive the clock times of each prediction. I would now like to graph this data with points showing

### Re: [R] to draw a smooth arc

There is the grid.xspline function in the grid package that allows for things like this (the control points, though more general than what you state). I don't know if it uses the postscript curveto, or approximates using line segments. You can also use the xfig device, then use xfig, winfig, or

### Re: [R] Polar graph of time and tide

Alan E. Davis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have been trying to visualize times of lowest tides, month by month. I have tide predictions with times either in unix time or a text format, and heights in feet or meters. I had been able to derive the clock times of

### [R] creating eps files

Hello, For a long time, I have been creating eps files from R using the following command: dev.copy2eps(file=my.eps) This has worked very well. But recently, the compositor of a journal is complaining that The eps files would be useable except that they have not converted the type to

### Re: [R] to draw a smooth arc

Here is an approach that clips the circle you like from symbols down to an arc (this will work as long as the arc is less than half a circle, for arcs greater than half a circle, you could draw the whole circle then use this to draw an arc of the bacground color over the section you don't want):

### Re: [R] creating eps files

On Tue, 1 May 2007, Tak Wing Chan wrote: Hello, For a long time, I have been creating eps files from R using the following command: dev.copy2eps(file=my.eps) This has worked very well. But recently, the compositor of a journal is complaining that The eps files would be useable except

### Re: [R] Concepts question: environment, frame, search path

On Tue, 1 May 2007, Duncan Murdoch wrote: On 01/05/2007 12:29 AM, Graham Wideman wrote: Folks: I'd appreciate if someone could straighten me out on a few concepts which are described a bit ambiguously in the docs. 1. data.frame: Refan p84: 'A data frame is a list of

### [R] logrank test

how do l programme the logrank test. l am trying to compare 2 survival curves - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

### Re: [R] logrank test

raymond chiruka wrote: how do l programme the logrank test. l am trying to compare 2 survival curves library(survival) ?survdiff __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

### Re: [R] logrank test

Hi, On 5/1/07, raymond chiruka [EMAIL PROTECTED] wrote: how do l programme the logrank test. l am trying to compare 2 survival curves if you simply want to use the logrank test, have a look at the first example of the function survdiff in the survival package. If you read the help page

### Re: [R] logrank test

On Tue, 2007-05-01 at 08:34 -0700, raymond chiruka wrote: how do l programme the logrank test. l am trying to compare 2 survival curves See: library(survival) ?survdiff and take note of the 'rho' argument, which when set to 0 is the logrank test. HTH, Marc Schwartz

### [R] linout=TRUE in nnet package ?

Hello, I am trying to figure out what nnet does when you select nnet =TRUE, I understand that it provides you with linear outputs, but I don't understand how it arrives at those linear outputs. I assume that nnet still applies the logistic function as the activation function for the nodes in the

### Re: [R] to draw a smooth arc

On Tue, 1 May 2007, Greg Snow wrote: Here is an approach that clips the circle you like from symbols down to an arc (this will work as long as the arc is less than half a circle, for arcs greater than half a circle, you could draw the whole circle then use this to draw an arc of the bacground

### Re: [R] logrank test

And since Peter Dalgaard also just answered (without advertising his book): if you (or your library) happen to have 'Introductory Statistics with R' by Peter Dalgaard, have a look at section 12.4. Best, Roland On 5/1/07, raymond chiruka [EMAIL PROTECTED] wrote: how do l programme the logrank

### [R] Matrix column name

Dear R users, Having searched the mail archive I think the conclusion was that it is not possible to have a column name when there is only one column in the matrix. But I thought I'd check with the more experienced users. What I tried to do was: in a loop I pick a column, record the column name

### [R] Simulation using parts of density function

Hi My simulation with the followin R code works perfectly: sim - replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12 But now I do not want to have values in object sim exceeding 5'000'000, that means that I am just using the beginning of densitiy function gamma x 15.4.

### Re: [R] Matrix column name

On Tue, 2007-05-01 at 18:03 +0100, alex lam (RI) wrote: Dear R users, Having searched the mail archive I think the conclusion was that it is not possible to have a column name when there is only one column in the matrix. But I thought I'd check with the more experienced users. What I

### [R] calculating area under the ROC curve

Hi, I recently did a study where we gathered decisions and confidence ratings. My understanding is that I can convert this to a ROC curve by getting hits and false alarms at the various confidence ratings. I figured out that part of the problem. I noticed a few functions for

### Re: [R] to draw a smooth arc

Dr. Snow and Prof. Ripley, Dr. Snow's suggestion, using clipplot (package TeachingDemos), is maybe a partial solution to the problem of drawing an arc of a circle (as long as the line width of the arc is not that large, as pointed out by Prof. Ripley). If the arc is symmetrical around a vertical

### [R] sorting in barplot

Hello, I'm trying to sort my bargraph.CI plot (function like barplot in the SCIPLOT package) by the mean of the response variable. Does somebody have a trick for it. Thank you. Romain Mayor, PHD student. __ R-help@stat.math.ethz.ch mailing list

### Re: [R] sorting in barplot

On Tue, 2007-05-01 at 19:33 +0200, [EMAIL PROTECTED] wrote: Hello, I'm trying to sort my bargraph.CI plot (function like barplot in the SCIPLOT package) by the mean of the response variable. Does somebody have a trick for it. Thank you. Romain Mayor, PHD student. If it is built on

### Re: [R] Simulation using parts of density function

On 01-May-07 17:03:46, Thür Brigitte wrote: Hi My simulation with the followin R code works perfectly: sim - replicate(999, sum(exp(rgamma(rpois(1,2000), scale = 0.5, shape = 12 But now I do not want to have values in object sim exceeding 5'000'000, that means that I am just using

### [R] Free Webinar: Vendor Neutral Intro to Data Mining for Absolute Beginners, May 23, 2007

ONLINE VENDOR NEUTRAL INTRO TO DATA MINING FOR ABSOLUTE BEGINNERS (no charge) A non-technical data mining introduction for absolute beginners May 23, 2007, 10AM - 11AM PST Future Sessions (June 14, Sept 7) To register for the webinar --- 1.

### Re: [R] to draw a smooth arc

Hi Paulo Barata wrote: Dr. Snow and Prof. Ripley, Dr. Snow's suggestion, using clipplot (package TeachingDemos), is maybe a partial solution to the problem of drawing an arc of a circle (as long as the line width of the arc is not that large, as pointed out by Prof. Ripley). If the arc is

### Re: [R] Matrix column name

You seem to be looking for matrix.a[,-1, drop = TRUE] On Tue, 1 May 2007, alex lam (RI) wrote: Dear R users, Having searched the mail archive I think the conclusion was that it is not possible to have a column name when there is only one column in the matrix. But I thought I'd check with

### [R] to calculate sums

Dear R-users, I am trying to use R to calculate sums like the ones in the file attached. Would you please provide some help? At the moment I have no clue about how to due... Thank you in advance, Kind regards, Pedro __ R-help@stat.math.ethz.ch

### [R] dlda{supclust} 's output

Hi, I am using dlda algorithm from supclust package and I am wondering if the output can be a continuous probability instead of discrete class label (zero or one) since it puts some restriction on convariance matrix, compared with lda, while the latter can. thanks, -- Weiwei Shi, Ph.D Research

### Re: [R] to draw a smooth arc

Dr. Murrell and all, One final suggestion: a future function arc() in package graphics, with centre-radius-angle parameterisation, could also include an option to draw arrows at either end of the arc, as one can find in function arrows(). Thank you. Paulo Barata

### Re: [R] to draw a smooth arc

Hi Paulo Barata wrote: Dr. Murrell and all, One final suggestion: a future function arc() in package graphics, with centre-radius-angle parameterisation, could also include an option to draw arrows at either end of the arc, as one can find in function arrows(). ... and in grid.xspline()

### [R] Percentage area of a distribution

It seems like this should be pretty straight forward, but for some reason the answer escapes me. I have a normal distribution S made up of two normal distributions C and C-bar. I need to find the percentage of the area of S that both C and C-bar occupy. Any suggestions? Thanks in advance, Alan

### Re: [R] Percentage area of a distribution

let me amend my previous message to remove a silly mistake: I have a (non-normal) distribution S that is a mixture of two normal distributions C and C-bar. I need to find the percentage of the area of S that both C and C-bar occupy. Thanks again, Alan Gibson On 5/1/07, Leeds, Mark (IED) [EMAIL

### [R] optimising fitted distributions

Dear R experts, I am relatively new to R and am interested in whether there is a package which will fit data with a swag of distributions and determine the optimal fit such as stat::fit from technical software solutions? As is discussed in the following r-help posting goodfit in vcd seems to

### [R] ED50 from logistic model with interactions

Hi, I was wondering if someone could please help me. I am doing a logistic regression to compare size at maturity between 3 seasons. My model is: fit - glm(Mature ~ Season * Size - 1, family = binomial, data=dat) where Mature is a binary response, 0 for immature, 1 for mature. There are 3

### Re: [R] Concepts question: environment, frame, search path

Duncan: Thanks for taking a stab at my questions -- in following up I discovered the root of my difficulties -- I had not noticed document R-lang.pdf (R Language Definition). This clarifies a great deal. FWIW, it seems to me that a number of things I was hung up on (and which you

### [R] the Surv function

Hi, I'm trying to do a simple survival analysis on some data, and I'm having the following problem (here's my code and the error message): out - Surv(fup,event=status) Error in Surv(fup, event = status) : argument time2 is missing, with no default From reading the documentation, it seems that I

### Re: [R] the Surv function

Try using the following (without naming the arguments) - it should work. Surv(fup, status) I think what is happening is that if you use one or two arguments (unnamed), Surv assumes that you have right-censored data, with the first argument being time and the second being status. By specifying

### [R] ? R 2.5.0 alpha bug

This email is intended to highlight 2 problems that I encountered running R 2.5.0 alpha on a Windows XP machine. #1 - Open script error If I click the Open folder icon on the toolbar, R opens my script files perfectly. However, when I select File Open Script MyFileLocation, I get a fatal

### [R] Warnings in package dependencies and /src contains object files.

Dear All, I recently wrote a package in R and did a check on my package, all is well except for two warnings: * checking package dependencies ... WARNING 'library' or 'require' calls not declared from: MASS See the information on DESCRIPTION files in the chapter 'Creating R packages'