Re: [R] Format integer

2008-05-13 Thread Prof Brian Ripley
This is one of those problems where the fine details matter. 1) The version of R. I optimized sprintf() for long inputs and a single format in R 2.7.0 -- the differences are mainly for multiple inputs and where coercion is needed. See also below. 2) The system. My home system with an

Re: [R] is.category

2008-05-13 Thread Hans W Borchers
Applejus ielkhoury at gmail.com writes: Hello, Could someone tell me what the SPLUS is.category function do and what is its equivalent in R? Thank you, I couldn't find any help elsewhere... If you Web search for splus help or similar, you will find, among others,

[R] Compare columns

2008-05-13 Thread Suhaila Zainudin
Dear R-users, I have the following 2 files; A V1V2 A 1 A 2 A 3 A 4 B 1 B 4 C 1 C 3 D 4 B V1V2 process1 1 process2 2 process3 3 process4 4 I want to get this output C V1V2 V3 A 1

Re: [R] ggplot2: font size mismatch for pdf output

2008-05-13 Thread Xavier Chardon
What you can do is change the parameter pointsize when creating the device. See ?pdf. It will change the size of all texts (labels, legend, title...) at the same time. I tried it with png, it works quite well (provided you use the latest versions of everything, including cairo, I think).

[R] array dimension changes with assignment

2008-05-13 Thread Knut M. Wittkowski
Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? GT - array(dim = c(6,nrow(InData),ncol(InSNPs))) dim(GT) [1]6 3178 93 SNP1 - InSNPs[InData[,C1],] dim(SNP1) [1] 3178 93 SNP2 - InSNPs[InData[,C2],] dim(SNP2) [1] 3178 93

[R] How to get predicted marginal (aka predicted mean) after multinomial logistic?

2008-05-13 Thread monogift
I tried to use the effect() to get predicted marginals for multinomial logistic as I did for general logistic regression, but failed. Is there anyway to do that? Thx! -- View this message in context:

[R] how to do trend test?

2008-05-13 Thread monogift
say I have a categorical variable X with 3 levels coded as 1,2,3 and then I have a table of age, sex and etc, by X, which looks like the following: x-level1 x-level2 x-level3p-trend age 5654 57 ?

[R] R help: problems with step function

2008-05-13 Thread Ping Wang
Dear List Members, I have encountered two problems when using the step function to select models. To better illustrate the problems, attached is an R image which includes the objects needed to run the code attached. lm.data.frame have factor variables with 3 levels. The following run shows the

Re: [R] Left censored responses in mixed effects models

2008-05-13 Thread Giovanni Parrinello
Dear Bert, a solution is the 'package' censre3 by Hughes JP Reference: Hughes JP: Mixed effects models with censored data with application to HIV RNA levels. Biometrics, 55:625-629, 1999. Giovanni Don MacQueen ha scritto: I assume you've looked at the NADA package(?) While I don't believe

Re: [R] Left censored responses in mixed effects models(II)

2008-05-13 Thread Giovanni Parrinello
Dear Bert, you can also translate in nlme, as I'm trying to do, the approach of Thiébaut and *Gadda( *Mixed models for longitudinal left-censored repeated measures. Computer Methods and Programs in Biomedicine 74

[R] Permutations

2008-05-13 Thread Elke Moons
Dear R-users, Is there an easy way to determine all possible vectors of length 21 with each entry having permutations from 0 to 4, instead of doing it like this? It really takes up too much time, and I am convinced that there exists something easier. Can you help me? Thank you in advance!

Re: [R] Permutations

2008-05-13 Thread ONKELINX, Thierry
Dear Elke, I think you need something like this. It's only for 3 variables, but I think you know how to expand it for more variables. mat - expand.grid(a = 0:4, b = 0:4, c = 0:4) write.table(mat, file=C:/Documents and Settings/My Documents/permutations.txt,sep=;,col.names=FALSE, row.names=FALSE)

[R] xirr...

2008-05-13 Thread Alberto Santini
Hello. A few weeks ago, I need to calculate the Internal Rate of Return for irregular intervals. There is the package 'financial', with the function 'cashflow', calculating irr for regular intervals. So I developed xirr, managing irregular intervals, that's accepting a vector of dates as xirr

Re: [R] ggplot2: font size mismatch for pdf output

2008-05-13 Thread Prof Brian Ripley
If I do windows(width=6, height=5) then the pdf plot is very good copy of what I see on screen. So the main issue seems to be that you changed the device size when you asked for the save. If you do that, you need to change 'pointsize' too -- but as you changed the aspect ratio, you

Re: [R] Permutations

2008-05-13 Thread Stephan Kolassa
Hi Elke, the matrix you are trying to create has 5^21 = 476837158203125 rows and 21 columns. I'm afraid Thierry's proposal with n=21 will not fit into memory. And the file you are writing is 5^21*5*8 bytes big, about 80108643 GB. Perhaps you want to think a little more about what you are

Re: [R] fft: characteristic function to distribution

2008-05-13 Thread Thomas Steiner
Matthias Kohl was so kind and provided me the following lines in this issue: library(distrEx) chf - function(t, D){ E(D, function(x){exp(1i*t*x)}, useApply = FALSE) } ## Normalverteilung D - Norm() t - seq(-3, 3, by = 0.05) chf.norm - sapply(t, chf, D = D) chf.exakt - exp(-t^2/2) chf.diff -

[R] Regular Expressions

2008-05-13 Thread Shubha Vishwanath Karanth
Hi R, Again struck with regular expressions... Suppose, S=c(World_is_beautiful, one_two_three_four,My_book) I need to extract the last but one element of the strings. So, my output should look like: Ans=c(is,three,My) gsub() can do this...but wondering how do I give the

Re: [R] Regular Expressions

2008-05-13 Thread Dimitris Rizopoulos
try this: S - c(World_is_beautiful, one_two_three_four,My_book) sapply(strsplit(S, _), tail, n = 2)[1, ] # or sapply(strsplit(S, _), function(x) x[length(x) - 1]) I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of

Re: [R] Format integer

2008-05-13 Thread Esmail Bonakdarian
Anh Tran wrote: Hi, What's one way to convert an integer to a string with preceding 0's? such that '13' becomes '013' to be put into a string I've tried formatC, but they removes all the zeros and replace it with blanks Hi, try sprintf: i=13 cat(sprintf(%05d\n, i)) 00013 HTH,

Re: [R] array dimension changes with assignment

2008-05-13 Thread Jeremiah Rounds
Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? GT - array(dim = c(6,nrow(InData),ncol(InSNPs))) dim(GT)[1] 6 3178 93 SNP1 - InSNPs[InData[,C1],] dim(SNP1)[1] 3178 93 SNP2 - InSNPs[InData[,C2],] dim(SNP2)[1] 3178 93

Re: [R] Random number generation

2008-05-13 Thread Jim Lemon
On Behalf Of Esmail Bonakdarian wrote: ... What I read doesn't seem to be incorrect however (it may even have been an archived message here), the *language* itself does not seem to support block *comments*. Using conditional constructs, or an IDE/editor to achieve similar results is a work

Re: [R] test

2008-05-13 Thread Esmail Bonakdarian
Tony Plate wrote: You probably should check this section in your R-help subscription options (via https://stat.ethz.ch/mailman/options/r-help/, I think): Receive your own posts to the list? Tony, Like jt I too have it set to receive my own messages, but I too don't see them. I wonder if

[R] add horizontal line (ABLINE(V=)) to xyplot lattice

2008-05-13 Thread pecardoso
Hi, In a lattice plot like this: win.graph() xyplot(tmx~frequ|as.factor(as.numeric(spf)),groups=as.factor(blm),data=tmx,type=l,pch=16,xlab=frequency (N),ylab=Area held (ha), auto.key=list(blm,points=F,lines=T,title=Blm factor,cex.title=0.7,cex=0.7,corner=c(1,1)),main=Mangroves

Re: [R] Regular Expressions

2008-05-13 Thread Richard . Cotton
S=c(World_is_beautiful, one_two_three_four,My_book) I need to extract the last but one element of the strings. So, my output should look like: Ans=c(is,three,My) gsub() can do this...but wondering how do I give the regular expression sapply(strsplit(S, _), function(x)

[R] help needed please

2008-05-13 Thread TEBBI FATIMA
HI I have a data to test its normality and simulate after how with R. thanks in advance __ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] test

2008-05-13 Thread Charilaos Skiadas
On May 13, 2008, at 5:52 AM, Esmail Bonakdarian wrote: Tony Plate wrote: You probably should check this section in your R-help subscription options (via https://stat.ethz.ch/mailman/options/r-help/, I think): Receive your own posts to the list? Tony, Like jt I too have it set to receive

Re: [R] Left censored responses in mixed effects models

2008-05-13 Thread Richard Cotton
Bert Gunter wrote: What is your recommended way of dealing with a left-censored response (non-detects) in (linear Gaussian) mixed effects models? Specifics: Response is a numeric positive measurement (of volume, actually); but when it falls below some unknown and slightly random value

Re: [R] test

2008-05-13 Thread Esmail Bonakdarian
Charilaos Skiadas wrote: On May 13, 2008, at 5:52 AM, Esmail Bonakdarian wrote: Tony Plate wrote: You probably should check this section in your R-help subscription options (via https://stat.ethz.ch/mailman/options/r-help/, I think): Receive your own posts to the list? Tony, Like jt I

Re: [R] How to get predicted marginal (aka predicted mean) after multinomial logistic?

2008-05-13 Thread John Fox
Dear monogift, effect() doesn't currently handle mulinom objects. You'll find a paper, some functions, and some example code at http://socserv.mcmaster.ca/jfox/Misc/polytomous-effect-displays/index.html for effect displays for multinomial and proportional odds logit models, with standard errors

[R] pch=. plots much faster

2008-05-13 Thread Charles Plessy
Dear list, I realised by chance when analysing a 1521862 × 8 matrix that plotting was much faster when using . as the argument of `pch'. I was just wondering if there were other ways to get this speed improvement: it is otherwise quite difficult to explore such big matrices, especially given that

[R] Remove an object by the reference

2008-05-13 Thread Shubha Vishwanath Karanth
Hi R, A simple question, but don't know the answer... x=a a=5 I need to remove the object a by using only x. something like rm(somefunction(x))...Is this possible? Shubha Karanth | Amba Research Ph +91 80 3980 8031 | Mob +91 94 4886 4510 Bangalore * Colombo * London * New York

Re: [R] Remove an object by the reference

2008-05-13 Thread Richard Pearson
How about rm(list=x)? Richard. Shubha Vishwanath Karanth wrote: Hi R, A simple question, but don't know the answer... x=a a=5 I need to remove the object a by using only x. something like rm(somefunction(x))...Is this possible? Shubha Karanth | Amba Research Ph +91 80

Re: [R] add horizontal line (ABLINE(V=)) to xyplot lattice

2008-05-13 Thread Richard . Cotton
In a lattice plot like this: win.graph() xyplot(tmx~frequ|as.factor(as.numeric(spf)),groups=as.factor(blm), data=tmx,type=l,pch=16,xlab=frequency (N),ylab=Area held (ha), auto.key=list(blm,points=F,lines=T,title=Blm factor,cex.title=0.7, cex=0.7,corner=c(1,1)),main=Mangroves

Re: [R] Remove an object by the reference

2008-05-13 Thread Gabor Csardi
a - 1 x - a rm(list=x) a Error: object a not found See ?rm for details. Gabor On Tue, May 13, 2008 at 05:13:41PM +0530, Shubha Vishwanath Karanth wrote: Hi R, A simple question, but don't know the answer... x=a a=5 I need to remove the object a by using only x.

Re: [R] pch=. plots much faster

2008-05-13 Thread Prof Brian Ripley
On Tue, 13 May 2008, Charles Plessy wrote: Dear list, I realised by chance when analysing a 1521862 × 8 matrix that plotting was much faster when using . as the argument of `pch'. Why is that surprising? Drawing a small square is rather easy compared to a circle, say. I was just

[R] upperbound of C index Conf.int. greater than 1

2008-05-13 Thread DAVID ARTETA GARCIA
R-users, I am bootstrapping the C Index of a model created using lrm{Design} and boot{boot}, and I get that the upperbound of the confidence interval is greater than 1. Here is my code: library(HSAUR) data(plasma) ##fit model fit.design - lrm (ESR ~ fibrinogen + globulin,data=plasma)

Re: [R] ggplot2: font size mismatch for pdf output

2008-05-13 Thread hadley wickham
There is a bug in ggsave() for bitmap devices: it computes the width and height from 'dpi', but it fails to pass that information on to the devices, which assume 72dpi. So what it actually asked for was a 8 x 6.67 inch plot at 72dpi. 72dpi would be a better default, as not all of the many

Re: [R] Regular Expressions

2008-05-13 Thread Gabor Grothendieck
On Tue, May 13, 2008 at 5:02 AM, Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Suppose, S=c(World_is_beautiful, one_two_three_four,My_book) I need to extract the last but one element of the strings. So, my output should look like: Ans=c(is,three,My) gsub() can do this...but

[R] R benchmarking program

2008-05-13 Thread Baker D.J.
Hi All, I've just rebuild the latest R with the Goto BLAS on our new Intel quad core machines. I did a few basic matrix calculations, and I was very impressed by the performance I saw. I wonder if anyone has a more rigorous benchmarking program for R. I downloaded a old R test/benchmarking

[R] Calling C code from R...wrapping C structures

2008-05-13 Thread Nathan Harmston
Hi everyone, I am currently trying to call some C code from R, specifically calling a function which populates a C struct. typedef struct{ // contents } Model; void test(Model *m){ // fill the struct with crap } I compile the C code into a shared library, which loads into R properly. My

[R] Bubble plot pie chart map

2008-05-13 Thread Davidson, D.
Hello, I am currently trying to show the abundance of two species of zooplankton within the North Sea as pie chart bubble plots. I followed Werner Wernersen's advice in R help (http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48644.html) and used Paul Murrell's paper Integrating Grid Graphics

[R] Likelihood between observed and predicted response

2008-05-13 Thread Christophe LOOTS
Hi, I've two fitted models, one binomial model with presence-absence data that predicts probability of presence and one gaussian model (normal or log-normal abundances). I would like to evaluate these models not on their capability of adjustment but on their capability of prediction by

Re: [R] pch=. plots much faster

2008-05-13 Thread Karl Ove Hufthammer
Prof Brian Ripley: matrices, especially given that X11 redraws the plot whenever its window is covered/uncovered by another window, or when I switch virtual desktops. That is a function of your X setup.  R does ask for backing store to be used, and so it seeems your setup is not doing so.

Re: [R] Compare columns

2008-05-13 Thread Jorge Ivan Velez
Hi Suhaila, Is this what you want? A= V1V2 A 1 A 2 A 3 A 4 B 1 B 4 C 1 C 3 D 4 B=V1V2 process1 1 process2 2 process3 3 process4 4 A=read.table(textConnection(A),header=TRUE)

Re: [R] Simple regex problem

2008-05-13 Thread John Kane
Thanks to Gabor Grothendieck Ted Harding. both solutions work very nicely. --- Gabor Grothendieck [EMAIL PROTECTED] wrote: Try this (no gsub required): as.chron(as.Date(xx, %b %d, %Y)) On Sat, May 10, 2008 at 12:49 PM, John Kane [EMAIL PROTECTED] wrote: I am cleaning up some

Re: [R] How can one make stepAIC and lme

2008-05-13 Thread Jorunn Slagstad
Hi again, I've tried using with() inside my function in the following manner: library(nlme) library(MASS) PredRes-function(D1) { with(D1, {lmemod-lme(distance~age*Sex, random=~1|Subject, data=subset(D1,age!=14), method=ML) themod-stepAIC(lmemod,dir=both) summary(themod)

[R] Problem with odfWeave: Unescaped '' not allowed in attributes values

2008-05-13 Thread Aleksey Naumov
Dear R users, I am having a problem with odfWeave: when I run odfWeave('notes.odt', 'notes_out.odt') I get a bunch of errors that start with Unescaped '' not allowed in attributes values in post-processing: snip ... 'content_1.xml' has been Sweaved Removing content.xml

Re: [R] R benchmarking program

2008-05-13 Thread Philippe Grosjean
Hello, I did this bechmark test. Perhaps is it a good oppotunity to rewrite it and make it compatible with R 2.7.0, David? Best, Philippe Grosjean ..°})) ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical

Re: [R] Random number generation

2008-05-13 Thread Esmail Bonakdarian
Greg Snow wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Esmail Bonakdarian Sent: Sunday, May 11, 2008 7:25 AM To: Prof Brian Ripley Cc: [EMAIL PROTECTED] Subject: Re: [R] Random number generation [snip] What I read doesn't seem to be

[R] R benchmarking program

2008-05-13 Thread Baker D.J.
Hi All, I've just rebuild the latest R with the Goto BLAS on our new Intel quad core machines. I did a few basic matrix calculations, and I was very impressed by the performance I saw. I wonder if anyone has a more rigorous benchmarking program for R. I downloaded a old R test/benchmarking

Re: [R] Converting qqplot2 qplot() to grammar?

2008-05-13 Thread hadley wickham
On Mon, May 12, 2008 at 3:31 PM, B. Bogart [EMAIL PROTECTED] wrote: Hello all, I've been using the following qplot command: qplot(pixX,pixY, data=som, geom=tile, fill=rgb) + scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY) Now I would like to convert it into

Re: [R] Random number generation

2008-05-13 Thread Karl Ove Hufthammer
Esmail Bonakdarian: you could always run your R scripts through the C preproccessor and have it strip the block comments for you. Too much work, call me old school, but I like the computer do work for me, rather than the other way around Most editors (and every editor worth using)

[R] A Very Simple Question

2008-05-13 Thread Yukihiro Ishii
Hi Rusers! I am ashed of asking such a simple question. X-matrix(rnorm(24), 4) X0-apply(X,2,mean) What I want is a matrix which consists of colums such as X[,1]--X0[1]. X-X0 doesn't work. Perhaps apply function? Thanks in advance. Yukihiro Ishii 2-3-28 Tsurumakiminami, Hadano, 250-0002

Re: [R] Calling C code from R...wrapping C structures

2008-05-13 Thread Duncan Murdoch
On 5/13/2008 7:51 AM, Nathan Harmston wrote: Hi everyone, I am currently trying to call some C code from R, specifically calling a function which populates a C struct. typedef struct{ // contents } Model; void test(Model *m){ // fill the struct with crap } I compile the C code into a

Re: [R] what kind of residuals are the ones calculated in coxph?

2008-05-13 Thread Roland Rau
Hi Karen, those are martingale residuals. You don't have to be a Guru to find it out. Did you check ?coxph Under values it tells you an object of class coxph. See coxph.object for details. So you can ask for help for coxph.object ?coxph.object and then you will see among the components:

Re: [R] poisson regression with robust error variance ('eyestudy

2008-05-13 Thread Michael Dewey
At 00:56 09/05/2008, Ted Harding wrote: I'd like to thank Paul Johnson and Achim Zeileis heartily for their thorough and accurate responses to my query. I think that the details og how to use the procedure, and of its variants, which they have sent to the list should be definitive -- and very

[R] Plotting Frequency Distribution in R

2008-05-13 Thread Sachin J
Hi, How can plot a frequency distribution curve for the following data.    V1  V2 1   1 160.54% 2   1 201.59% 3   1  18.45% 4   1 179.03% 5   1 274.37% 6   1   0.00% 7   1  24.52% 8   1  39.17% 9   3  43.72% 10  1  53.06% 11  1  64.97% 12  1  79.84% 13  1  98.08% 14  1 115.32% 15  1 127.96%

Re: [R] array dimension changes with assignment

2008-05-13 Thread Duncan Murdoch
On 5/13/2008 12:47 AM, Knut M. Wittkowski wrote: Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? Your example is not reproducible. When I make one that is reproducible, I don't see the error: GT - array(dim = c(6,3178,93)) dim(GT) [1]

Re: [R] R benchmarking program

2008-05-13 Thread Baker D.J.
Hello Philippe, Thank for your reply. I agree that this is an interesting project. As I say we have just started to buy Intel quad core machines after years of offered a service on AMD machines. I recompiled R with the GoTo BLAS, and did some basic tests..things like matrix cross products,

[R] details for help needed please

2008-05-13 Thread TEBBI FATIMA
thank you very much Mr john Kane ,Mr Jorge Ivan Velez i first do an cpa method for my LogNeperien (data hydrology ) (30years of inflows) for 12 months to be sure that my residuals normality will be true in order to reconstitute the 30years of the data with pca in an other way choice of

Re: [R] A Very Simple Question

2008-05-13 Thread Chuck Cleland
On 5/13/2008 10:27 AM, Yukihiro Ishii wrote: Hi Rusers! I am ashed of asking such a simple question. X-matrix(rnorm(24), 4) X0-apply(X,2,mean) What I want is a matrix which consists of colums such as X[,1]--X0[1]. X-X0 doesn't work. Perhaps apply function? scale(X, scale=FALSE) ?scale

Re: [R] A Very Simple Question

2008-05-13 Thread Greg Snow
?sweep -Original Message- From: Yukihiro Ishii [EMAIL PROTECTED] To: r-help@r-project.org r-help@r-project.org Sent: 5/13/08 8:30 AM Subject: [R] A Very Simple Question Hi Rusers! I am ashed of asking such a simple question. X-matrix(rnorm(24), 4) X0-apply(X,2,mean) What I want is a

Re: [R] How can one make stepAIC and lme

2008-05-13 Thread Prof Brian Ripley
You are using subset() as a function -- lme has a subset argument, and subset() has non-standard semantics. The dataset you are using is subset(D1,age!=14): it is that which you need to make sure is visible. You didn't make D1 visible, just its columns. On Tue, 13 May 2008, Jorunn Slagstad

Re: [R] pch=. plots much faster

2008-05-13 Thread Prof Brian Ripley
On Tue, 13 May 2008, Karl Ove Hufthammer wrote: Prof Brian Ripley: matrices, especially given that X11 redraws the plot whenever its window is covered/uncovered by another window, or when I switch virtual desktops. That is a function of your X setup.  R does ask for backing store to be

Re: [R] R benchmarking program

2008-05-13 Thread Prof Brian Ripley
The best benchmark is a calculation you really want to do. For most people matrix algebra is an insignificant proportion of what they do in R. A few need complex matrix arithmetic (where compilers and BLAS differ a lot in speed). So there is no universal benchmark. Also, the reference BLAS

[R] calculating confidence intervals for the turnbull estimate

2008-05-13 Thread Soyeon Kim
Does anyone know of software to calculate confidence intervals for the non-parametric estimate of the survival distribution when data are interval censored, ie, for the Turnbull estimate? Thanks, Soyeon __ R-help@r-project.org mailing list

Re: [R] A Very Simple Question

2008-05-13 Thread Giovanni Petris
See ?scale HTH, Giovanni Date: Tue, 13 May 2008 23:27:59 +0900 From: Yukihiro Ishii [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=ybb20050223; d=ybb.ne.jp; Hi Rusers! I am ashed of asking such a simple question.

Re: [R] hessian in constrained optimization (constrOptim)

2008-05-13 Thread Giovanni Petris
See nlme::fdHess HTH, Giovanni Date: Mon, 12 May 2008 18:18:57 +0100 From: Carlo Fezzi [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list Thread-index: Aci0VENEgf84jUE7T0mEusn0OTj4AA== Dear helpers, I am using the function constrOptim to estimate a model with ML with an

Re: [R] Missing coefficient on a glm object

2008-05-13 Thread Prof Brian Ripley
On Tue, 13 May 2008, Diego Cesar wrote: Hello guys, i looked over the archive files and found nothing about this kind of error. It's a feature. I have a database of 33 elements described in 8 variables, i'm using the Leave-One-Out iterative process to take one of the elements to be the test

Re: [R] poisson regression with robust error variance ('eyestud

2008-05-13 Thread Ted Harding
On 13-May-08 14:25:37, Michael Dewey wrote: At 00:56 09/05/2008, Ted Harding wrote: I'd like to thank Paul Johnson and Achim Zeileis heartily for their thorough and accurate responses to my query. I think that the details og how to use the procedure, and of its variants, which they have sent to

[R] RE : Re: details for help needed please

2008-05-13 Thread TEBBI FATIMA
yes and this with other software like hydrolab(hydrology) will take big time and it is a very urgent work . many thanks Jorge Ivan Velez [EMAIL PROTECTED] a écrit : Hi Tebbi, Does it mean that you want to simulate your PCA analysis? Thanks, Jorge On Tue, May 13, 2008 at

[R] Missing coefficient on a glm object

2008-05-13 Thread Diego Cesar
Hello guys, i looked over the archive files and found nothing about this kind of error. I have a database of 33 elements described in 8 variables, i'm using the Leave-One-Out iterative process to take one of the elements to be the test element and make a regression with the other 32 and then I

[R] 3dscatterplot -different colors for different factors of the same variable

2008-05-13 Thread Moreno Ignazio Coco
Dear R users, I was trying to do a 3d scatterplot for the following set of datas: obj time X Y 1 yellow 333 388.7 492.3 2 yellow 567 388.7 492.3 3 green 621 135.5 371.7 4 green 1039 135.5 371.7 5 red 1373 744.1 205.0 6 red 1763 744.1 205.0 The points should be drew

Re: [R] Problem with odfWeave: Unescaped '' not allowed in attributes values

2008-05-13 Thread Max Kuhn
Aleksey, I am using the current version of odfWeave (0.7.5). The thing is, the file processed just fine in a previous version (0.7.3). Does anyone have any suggestion how to deal with this? I am now kind of locked since I cannot reproduce a report I was working on... What version of the

[R] ARCH model

2008-05-13 Thread Alberto Monteiro
I have an ARCH model like this: Delta y = y_{t+1} - t_t = k (theta - y_t) Delta t + v_t N(0,1) sqrt(Delta t) where v_t^2 = a_0 + a_1 (y_{t-1} - E[y_{t-1}])^2 Is there any R function that, given a series y_i, determines k, theta, a_0 and a_1 by maximum likelihood? I tried to use garch from

Re: [R] Random number generation

2008-05-13 Thread Greg Snow
-Original Message- From: Esmail Bonakdarian [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 8:13 AM To: Greg Snow Cc: Prof Brian Ripley; [EMAIL PROTECTED] Subject: Re: [R] Random number generation Greg Snow wrote: -Original Message- [snip] you could always run

Re: [R] Random number generation

2008-05-13 Thread Duncan Murdoch
On 5/13/2008 1:38 PM, Greg Snow wrote: -Original Message- From: Esmail Bonakdarian [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 8:13 AM To: Greg Snow Cc: Prof Brian Ripley; [EMAIL PROTECTED] Subject: Re: [R] Random number generation Greg Snow wrote: -Original Message-

Re: [R] Bubble plot pie chart map

2008-05-13 Thread Greg Snow
Using just base graphics you can use the floating.pie function from the plotrix package, or the my.symbols function from the TeachingDemos package with your own symbol/plotting function. Pie charts are usually not very useful, there may be another type of symbol (see the symbols function) or

[R] Repeated measures on a split-plot experiment

2008-05-13 Thread James Hudson
Please advise the proper format for coding the random effects of a split-plot experiment WITH repeated measures. I have been unable to figure out how to use either lme or lmer's grouping to properly assign the error terms. I am measuring univariate responses. Here is the set-up: WP - whole plot

Re: [R] 3dscatterplot -different colors for different facto rs of the same variable

2008-05-13 Thread Dieter Menne
Moreno Ignazio Coco M.I.Coco at sms.ed.ac.uk writes: I was trying to do a 3d scatterplot for the following set of datas: obj time X Y 1 yellow 333 388.7 492.3 2 yellow 567 388.7 492.3 3 green 621 135.5 371.7 4 green 1039 135.5 371.7 5 red 1373 744.1 205.0 6 red

Re: [R] pch=. plots much faster

2008-05-13 Thread Henrik Bengtsson
FYI, there is also smoothScatter() in the 'geneplotter' package (part of the Bioconductor.org project). /Henrik On Tue, May 13, 2008 at 5:08 AM, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Tue, 13 May 2008, Charles Plessy wrote: Dear list, I realised by chance when analysing a

[R] Is there a package assuming a DIRICHLET model for Marketing Consumer Panel

2008-05-13 Thread eugen pircalabelu
Hi List, I was wondering if there is a package in R that uses the DIRICHLET model for panel data like in Goodhart, Ehrenberg, Chatfield 1984. The model uses a combination of distributions and is specifically designed for marketing panel data, using input data such as penetration, brand

Re: [R] Repeated measures on a split-plot experiment

2008-05-13 Thread Douglas Bates
On Tue, May 13, 2008 at 1:40 PM, James Hudson [EMAIL PROTECTED] wrote: Please advise the proper format for coding the random effects of a split-plot experiment WITH repeated measures. I have been unable to figure out how to use either lme or lmer's grouping to properly assign the error terms.

Re: [R] upperbound of C index Conf.int. greater than 1

2008-05-13 Thread Frank E Harrell Jr
DAVID ARTETA GARCIA wrote: R-users, I am bootstrapping the C Index of a model created using lrm{Design} and boot{boot}, and I get that the upperbound of the confidence interval is greater than 1. Here is my code: library(HSAUR) data(plasma) ##fit model fit.design - lrm (ESR ~ fibrinogen

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-13 Thread Rolf Turner
Thanks very much for your long, detailed, patient, and lucid response to my cri de coeur. That helps a *great* deal. I'm not sure that I have a solid understanding of the issues yet --- I never am! --- but I think I'm getting there. I'll need to chew over the posting a bit more and try some

[R] Max consecutive increase in sequence

2008-05-13 Thread Marko Milicic
Hi all R helpers, I'm trying to comeup with nice and elegant way of detecting consecutive increases/decreases in the sequence of numbers. I'm trying with combination of which() and diff() functions but unsuccesifuly. For example: sq - c(1, 2, 3, 4, 4, 4, 5, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1); I'd

Re: [R] Max consecutive increase in sequence

2008-05-13 Thread Ingmar Visser
rle(diff(sq)) could be helpful here, best, Ingmar On May 13, 2008, at 11:19 PM, Marko Milicic wrote: Hi all R helpers, I'm trying to comeup with nice and elegant way of detecting consecutive increases/decreases in the sequence of numbers. I'm trying with combination of which() and diff()

[R] Question about how to save a txt file in .Rdata or .rda format

2008-05-13 Thread Joanna Dominguez
Hi Everybody, Suppose I have a *txt file*, named proof wich I have read it previously using the function *read.table( ). *And suppose I have an algorithm wich requires to load this file proof using the function *data ( ) * My problem is the following: how to store the file proof in *.Rdata*

[R] multiple plots over multiple pages

2008-05-13 Thread Dirkheld
Hi, I would like to iterate over a dataframe and plot several graphs over several pages. For instance, an iteration over the dataframe will result in 20 plots. Since 20 plots in one page is too much (too many small plots) I would like to distribute them over 5 pages with each 4 plots. I know

[R] About Iterative Convex Minorant algorithm in R

2008-05-13 Thread rsong
Dear List, Does anybody have R code about Iterative Convex Minorant algorithm for Cox model with interval censored data and be willing to share? The R package intcox works well in simulation, while it has converge problem in a data analysis. Any information are highly appreciated. Thanks, Rui

[R] Un-reproductibility of SVM classification with 'e1071' libSVM package

2008-05-13 Thread Pierre Dangauthier
Hello, When calling several times the svm() function, I get different results. Do I miss something, or is there some random generation in the C library? In this second hypothesis, is it possible to fix an eventual seed? Thank you Pierre ### Example library('e1071') x = rnorm(100) # train set

Re: [R] For Social Network Analysis-Graph Analysis - How to convert 2 mode data to 1 mode data?

2008-05-13 Thread Messing, Solomon O.
Hi Gabor, Thank you for your help, and thanks for making the excellent igraph package. The function below seems not generate an edge list that works for my data. I coerced a my data from a data frame using graph.data.frame. You asked in your previous post if 2-mode networks are bipartite. I

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-13 Thread Kingsford Jones
Hi Rolf, On Tue, May 13, 2008 at 1:59 PM, Rolf Turner [EMAIL PROTECTED] wrote: in response to Doug Bates' useful tutorial... Thanks very much for your long, detailed, patient, and lucid response to my cri de coeur. That helps a *great* deal. Hear Hear! snip One point that I'd like to

Re: [R] CRAN and Multiple Linear Regression

2008-05-13 Thread Anja und Th. Sponsel
I just have read the guide and I can do some small steps with cran but I still have no clue... I have data like this: X1 X2 X3 ... X21 Y 1 0 0 0 ... 18 -0,07254 2 1 0 0 ... 6 -0,14921 3 0

[R] plotting different level of classficifaction

2008-05-13 Thread jiho.han
hello, useRs~ suppose i have a matrix as follows: itemcategory sub-category A 1 11 B 1 12 C 1 12 D 2 21 E 2 22 i like to draw a plot that

Re: [R] multiple plots over multiple pages

2008-05-13 Thread jim holtman
Just keep plotting them. You will get additional pages after every four plots. Now I know this is true when using PDF as the output device. On Tue, May 13, 2008 at 5:56 PM, Dirkheld [EMAIL PROTECTED] wrote: Hi, I would like to iterate over a dataframe and plot several graphs over several

Re: [R] CRAN and Multiple Linear Regression

2008-05-13 Thread Jorge Ivan Velez
Hi Thomas, Perhaps: test = read.table(test.dat, header=T, dec=',') x - test[,1:21] y - test[, Y] mymodel - lm(y ~ x) # Coefficients and more information summary(mymodel) # Plots for the residuals plotspar(mfrow=c(2,2)) plot(mymodel) See also ?lm HTH, Jorge On Tue, May 13, 2008

Re: [R] Plotting Frequency Distribution in R

2008-05-13 Thread jim holtman
Does something like this do it for you: x - read.table(textConnection( V1 V2 1 1 160.54% 2 1 201.59% 3 1 18.45% 4 1 179.03% 5 1 274.37% 6 1 0.00% 7 1 24.52% 8 1 39.17% 9 3 43.72% 10 1 53.06% 11 1 64.97% 12 1 79.84% 13 1 98.08% 14 1 115.32% 15 1 127.96% 16

[R] mfrow

2008-05-13 Thread Agus Susanto
Dear members, I want to create 8 graphs and write it into one page using mfrow=c(4,2). How to make all graphs (including the titles, legends, line types) to be scale down (resized proportionally). As an illustration, below is the code: pdf(testmfrow.pdf) par(mfrow=c(4,2)) x-seq(1:10)

[R] The try() function with read.delim().

2008-05-13 Thread Rolf Turner
I have written a function which reads data from files using read.delim (). The names of these files are complicated and are built using arguments to the wrapper function. Since the files in question may or may not exist, I thought to enclose the read.delim() call in a try(): file -

  1   2   >