[R] coxph | anova results

2007-10-18 Thread Daniel Malter
Hi, I ran a coxph model and in the summary the independent variables are reported highly significant. However, if I run anova() on that model, some of the variables are reported to explain basically no deviance and other variables which are reported insignificant in the model summary are

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-18 Thread Gavin Simpson
On Wed, 2007-10-17 at 19:57 -0600, James wrote: On Oct 17, 2007, at 4:36 PM, James wrote: On Oct 17, 2007, at 10:18 AM, Waterman, DG ((David)) wrote: I agree. Avoid the lines like: iv = c( iv, min(i, j) ) I had code that was sped up by 70 times after fixing the size of my

[R] Lattice fails to draw insets

2007-10-18 Thread Sebastian Weber
Hello all lattice experts! I'm currently trying to plot inset figures in my lattice graphics. The plot is composed out of two panels and in each panel I want to show an inset figure which is a closeup of the data in each panel. Thus in each panel I call xyplot again to plot the inset which I

[R] Help: Side-by-side named barplot bars

2007-10-18 Thread Sergey Goriatchev
Hello, Let me describe what I have and what I want to do: I have two (7x6) matrices (call them A and B) that have same row and column names (rows=species, columns=variables) but contain numerical values that differ (same experiment done twice and values calculated and put in different matrices).

Re: [R] Error message in GAM

2007-10-18 Thread Simon Wood
In mgcv::gam smooths are represented using basis functions. The `k' argument of `s' specifies the number of basis functions to use. Its default value is 10. If you have fewer than k unique covariate values then the basis can not be set up. So you need to reduce k to at most the number of

[R] fit to power law with inknown zero

2007-10-18 Thread Thomas Hoffmann
Dear R-helpers I would like to do a fit of the form: y = a (x+c)**b, where a, b and c are unknown. Does anybody know how to do it? Thanks Thomas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] [R-pkgs] upgrade: relations

2007-10-18 Thread David Meyer
Dear useRs, a new version of the 'relations' package has appeared on CRAN. New features include: o support for fuzzy relations added o support for sets moved to separate 'sets' package o new SD fitters for the S (symmetric) and M (matches) families o fitters for Cook-Seiford

Re: [R] Multi-objective optimization

2007-10-18 Thread Paul Smith
On 10/17/07, Ravi Varadhan [EMAIL PROTECTED] wrote: What if simultaneously maximizing f(x,y) and g(x,y) is an incompatible objective? Modifying Duncan's example slightly, What if: f(x,y) = -(x-y)^2 and g(x,y) = -(x-2)^2-(y-x-1)^2? Here: (1) = x = y (2) = y = x + 1 (3) =

Re: [R] Help: Side-by-side named barplot bars

2007-10-18 Thread Jim Lemon
Sergey Goriatchev wrote: Hello, Let me describe what I have and what I want to do: I have two (7x6) matrices (call them A and B) that have same row and column names (rows=species, columns=variables) but contain numerical values that differ (same experiment done twice and values calculated

[R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread Etienne Toffin
Hi, A have small technical question about the calculation of R-squared using lm(). In a study case with experimental values, it seems more logical to force the regression line to pass through origin with lm(y ~ x +0). However, R-squared values are higher in this case than when I compute

Re: [R] problem with anova() and syntax in lmer

2007-10-18 Thread John Fox
Dear David and Gilles, Currently, Anova() in the car package doesn't handle lmer objects. I'm working on a default method for Anova that will work with objects that respond to coef() and vcov() and produce Wald-like tests. This should almost work for lmer objects, replacing coef() with fixef(),

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread Duncan Murdoch
On 18/10/2007 7:02 AM, Etienne Toffin wrote: Hi, A have small technical question about the calculation of R-squared using lm(). In a study case with experimental values, it seems more logical to force the regression line to pass through origin with lm(y ~ x +0). However, R-squared

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread Achim Zeileis
On Thu, 18 Oct 2007, Toffin Etienne wrote: Hi, A have small technical question about the calculation of R-squared using lm(). In a study case with experimental values, it seems more logical to force the regression line to pass through origin with lm(y ~ x +0). However, R-squared values are

[R] Writing a R-Script

2007-10-18 Thread erkan yanar
Ist there a possibility to write a R-Script using something like #!/usr/bin/R and then alle the requestet commands? Of course R CMD BATCH exists, but there was (for me) no possibility to write something like a HERE-script. regards erkan -- über den grenzen muß die freiheit wohl wolkenlos

Re: [R] Writing a R-Script

2007-10-18 Thread François Pinard
[erkan yanar] Ist there a possibility to write a R-Script using something like #!/usr/bin/R and then alle the requestet commands? You could use: #!/usr/bin/env Rscript (or if you happen to be sure of the location of the program): #!/usr/local/bin/Rscript See ?Rscript for more

Re: [R] Writing a R-Script

2007-10-18 Thread erkan yanar
Thx erkan -- über den grenzen muß die freiheit wohl wolkenlos sein __ 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.html and provide commented,

[R] tcltk: I guess I am starting to get it

2007-10-18 Thread Alberto Monteiro
I found a great site with many Perl/tk examples (it's in German): http://gd.tuwien.ac.at/languages/perl/Hajji-Perlkurs/part4/tkperl.html It's quite simple to convert these examples to R's tcltk. One that gave me some trouble was: # (please open the file to get the context) # (...) # a

[R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Juan Lewinger
Dear R-helpers, I need to insert an R (2.6.0) generated plot containing semi-transparent colors into PowerPoint (2002). When I directly paste it from the clipboard or insert it as (enhanced) Metafile (I'm on Windows XP) the semi-transparent colors don't show. When I insert it at as a Bmp, Png

Re: [R] Writing a R-Script

2007-10-18 Thread Ted Harding
On 18-Oct-07 11:56:48, erkan yanar wrote: Ist there a possibility to write a R-Script using something like #!/usr/bin/R and then alle the requestet commands? Of course R CMD BATCH exists, but there was (for me) no possibility to write something like a HERE-script. regards erkan Hmmm

[R] Nice reference to R

2007-10-18 Thread jim holtman
Just saw this in the Windows Secret blog: Get official and unofficial fixes for Excel By Brian Livingston Despite the hotfix that Microsoft recently released for Excel 2007, as I described on Oct. 11, some math errors that you should know about still lurk in both Excel 2007 and Excel 2003.

Re: [R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Juan Lewinger
Juan Lewinger lewinger at usc.edu writes: Also, 1) for the emf generated image look at the little circles at the bottom of each boxplot: the fill color has bled out. Why? 2) From the console menu I cannot save a plot as PDF (no file is saved when I try) In re to 2) I didn't mention

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread S Ellison
I think there is reason to be surprised, I am, too. ... What am I missing? Read the formula and ?summary.lm more closely. The denominator, Sum((y[i]- y*)^2) is very large if the mean value of y is substantially nonzero and y* set to 0 as the calculation implies for a forced zero intercept. In

[R] EM algorithm on a mixture of two negative binomials?

2007-10-18 Thread francogrex
Dear R stat experts, I am looking for an R function/code that can perform the EM algorithm to estimate the parameters of a mixture of two negative binomial distributions. I know that there are functions written that use the EM to estimate a mixture of normal distributions and also within the

[R] R-graphics printing greeks

2007-10-18 Thread Dan Avery
I have tried to print a table of greek alphabet names and symbols without success. I can print one character at a time but can't seem to find a way to automate an entire list of the symbols. Some of the code I have tried is below. I have searched on help, worked the examples in the December 2002 R

[R] Secondary Y axis title

2007-10-18 Thread John Theal
I have the following R code to create a plot with two y axes. I am essentially trying to plot a price series with a volume series on the same graph. (i.e. to compare price with volume). I can label the first y axis successfully, but the problem is in labeling the 2nd y-axis. Essentially,

Re: [R] Trouble with R CMD INSTALL

2007-10-18 Thread Gang Chen
Hi Liviu, Thank you very much for the response! I knew that would work within R, but was just wondering why R CMD INSTALL nlme does not work on the shell terminal. Any clue? Thanks, Gang On Oct 17, 2007, at 6:27 PM, Liviu Andronic wrote: On 10/17/07, Gang Chen [EMAIL PROTECTED] wrote:

Re: [R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Prof Brian Ripley
Please do check the archives: this has been mentioned several times, including yesterday, with a workaround (and it is fixed in R-patched). And I presume you meant the *graphics device* menu, not the console menu. On Thu, 18 Oct 2007, Juan Lewinger wrote: Juan Lewinger lewinger at usc.edu

Re: [R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Scionforbai
Any suggestions? When generating a bitmap (png is then the best solution) you can control the resolution with width and height parameters (in pixels): png(myimage.png,width=1800,height=1800) Then you just need to raster yor graph in an adequate resolution (more pixels means bigger file, of

Re: [R] image quality of plot inserted into PowerPoint

2007-10-18 Thread Juan Lewinger
Prof Brian Ripley ripley at stats.ox.ac.uk writes: Please do check the archives: this has been mentioned several times, including yesterday, with a workaround (and it is fixed in R-patched). And I presume you meant the *graphics device* menu, not the console menu. Thank you and yes, I

Re: [R] R-squared value for linear regression passing through origin using lm()

2007-10-18 Thread Ralf Goertz
S Ellison, Donnerstag, 18. Oktober 2007: I think there is reason to be surprised, I am, too. ... What am I missing? Read the formula and ?summary.lm more closely. The denominator, Sum((y[i]- y*)^2) is very large if the mean value of y is substantially nonzero and y* set to 0 as the

Re: [R] Secondary Y axis title

2007-10-18 Thread hadley wickham
On 10/18/07, John Theal [EMAIL PROTECTED] wrote: I have the following R code to create a plot with two y axes. I am essentially trying to plot a price series with a volume series on the same graph. (i.e. to compare price with volume). I can label the first Why not use a scatterplot? You

[R] How to avoid conversion to factors (data frame to zoo)

2007-10-18 Thread Li, Yan (IED)
Hi all, I was trying to convert a data frame to a zoo object so I can use some time series functions like lag(). But it seems then everything became a factor, so I have to convert it back to numeric to run the correct regressions. Is there a way to avoid it? Here is an example:

Re: [R] power law fit with unknown zero

2007-10-18 Thread Jeff Newmiller
Thomas Hoffmann wrote: Dear R-helpers I would like to do a fit of the form: y = a (x+c)**b, where a, b and c are unknown. Does anybody know how to do it? If they did but didn't answer, would it matter? PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] Courses**November-December (1) R/Splus Fundamentals (2) R/S Advanced Programing by XLSolutions Corp

2007-10-18 Thread Sue Turner
*** XLSolutions Corporation R/Splus Training: November-December, 2007 *** NOVEMBER-DECEMBER: we added 7 new courses to our R/Splus training webpages See full

Re: [R] Multi-objective optimization

2007-10-18 Thread Bert Gunter
I haven't followed this thread very closely, but it sounds like it may be related to the somewhat arcane idea of Desirability functions for multiple responses (mostly in th e experimental design context, as I recall). There were some papers on this in TECHNOMETRICS a couple of decades ago. The

Re: [R] How to avoid conversion to factors (data frame to zoo)

2007-10-18 Thread John Kane
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/98227.html Your Rprofile has the setting options(stringsAsFactors = TRUE) If you override it globally by using options(stringsAsFactors = FALSE) it will give you what you want but observe Gabor's caveat. I don't know of the other solution re

Re: [R] How to avoid conversion to factors (data frame to zoo)

2007-10-18 Thread Gabor Grothendieck
A zoo variable is a vector or matrix with an index so you can't mix types (factors and numeric) in a single zoo variable; however, you can represented the factor numerically: library(zoo) set.seed(1) a - data.frame( nn = letters[1:4], dd = as.Date(2007-08-01) + 1:4, x =

Re: [R] Secondary Y axis title

2007-10-18 Thread John Theal
Yes, a scatterplot would be better. But for the sake of interest, is it possible to get the label for the secondary y-axis to appear? I have been playing around with it all day in an attempt to get it to work and have been unsuccessful. I would like to know if it is possible and/or what

Re: [R] Bootstrapping Contrasts for Repeated Measures ANOVA

2007-10-18 Thread Alex Baugh
Two follow up questions from post regarding bootstrapping contrasts for a RM ANOVA: 1. Because my data are repeated measures, isn't it true that I want to shuffle my column heading individually for each subject (row) by resampling WITHOUT replacement? 2. For my DV (latency) I have 3 columns of

[R] Binomial Power/Sample Size

2007-10-18 Thread Bret Collier
All, I have been digging around in the help files and found bsamsize in Hmisc, but I am wondering if i am using it right. So, here is the question: given a binomial response (success/failure) for 2 groups (treatment/control) and I want to estimate the necessary sample size (n) to determine

Re: [R] [iso-8859-1] R-squared value for linear regression passing [iso-8859-1] through origin using lm()

2007-10-18 Thread Thomas Lumley
On Thu, 18 Oct 2007, Ralf Goertz wrote: S Ellison, Donnerstag, 18. Oktober 2007: I think there is reason to be surprised, I am, too. ... What am I missing? Read the formula and ?summary.lm more closely. The denominator, Sum((y[i]- y*)^2) is very large if the mean value of y is

Re: [R] Secondary Y axis title

2007-10-18 Thread Gabor Grothendieck
One of the examples here shows two Y axes each with a label: library(zoo) example(plot.zoo) On 10/18/07, John Theal [EMAIL PROTECTED] wrote: I have the following R code to create a plot with two y axes. I am essentially trying to plot a price series with a volume series on the same graph.

[R] class weight

2007-10-18 Thread Weiwei Shi
Hi, I am wondering which classification algorithms in R have implemented class weight for imbalanced data prediction? Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. Did you always know? No, I did not. But I believed... ---Matrix III __

Re: [R] R-graphics printing greeks

2007-10-18 Thread Prof Brian Ripley
You want a symbol, so for (i in 1:10) text(7, order[i], as.name(greeks[i])) (or as.symbol) gets you from character string to symbol. BTW1: please check the code you post: yours doesn't work. BTW2: the o is omicron: you can see a list of the names at

[R] cluster analysis

2007-10-18 Thread amna khan
Hi Sir How to perform cluster analysis using Ward's method and K- means clustering? Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] [R} Getting 'tilting' confidence intervals in R

2007-10-18 Thread Robert A. LaBudde
[Resend with proper subject line] I am trying to compute bootstrap confidence intervals for a sample using R 2.5.1 for Windows. I can get Normal, Basic, Percentile, BCa and ABC from boot.ci() and boot() in the Davison Hinkley boot package. But I can't figure out how to use tilt.boot() to get

Re: [R] cluster analysis

2007-10-18 Thread Liviu Andronic
On 10/18/07, amna khan [EMAIL PROTECTED] wrote: Hi Sir How to perform cluster analysis using Ward's method and K- means clustering? For beginning, try to perform it using the GUI Rcmdr. Regards, Liviu __ R-help@r-project.org mailing list

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-18 Thread Ravi Varadhan
Dear Prof. Ripley, You are right. I failed to pay attention to the following remark in the help page: Note that the storage used by DQRDC and DGEQP3 differs. Although this does not matter for solving a linear system (i.e. qr.solve()), the Q and R representations are indeed different. Thanks

[R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread Weiwei Shi
Hi, I am looking for an algorithm (better if it is implemented in R) which can do the following: from the following list: a,b,c,d a,b,c b,c a,b,c,d,e to calculate a,b,c,d: 2 a,b,c: 3 a,b: 3 a,c: 3 b,c: 4 b,c,d:2 here, the order is not important. Thanks. -- Weiwei Shi, Ph.D Research

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread jim holtman
It would be helpful if you explained what the numbers mean. On 10/18/07, Weiwei Shi [EMAIL PROTECTED] wrote: Hi, I am looking for an algorithm (better if it is implemented in R) which can do the following: from the following list: a,b,c,d a,b,c b,c a,b,c,d,e to calculate a,b,c,d: 2

Re: [R] error: unused arguments

2007-10-18 Thread jim holtman
What is 'foo'? It appears that foo does not take 2 arguments: foo - function(x) x foo(1,2) Error in foo(1, 2) : unused argument(s) (2) On 10/18/07, Aydemir, Zava (FID) [EMAIL PROTECTED] wrote: Hi what does this mean when i get above error? When I call function foo(), specifying

[R] programming question

2007-10-18 Thread raymond chiruka
hie i'm tryimg to generate two survival data using the following code (I know its ugly ) but it seems to repeat two of the variables can any one tell me whats the porblem. n=20 n1=n/2 n2=n/4 a11=1 ;a12=1.4 ;a21=16 ;a22=a12 * a21 t1-array(1,c(n1))

[R] X matrix deemed to be singular in counting process coxph

2007-10-18 Thread caspar
Dear all, I have a question with respect to counting process formulation of the coxph(survival) model. I have two groups of observations for which I have partitioned each observation into two distinct time intervals, namely, entry day till day 13, and day 13 till death or censorship day (of

[R] setSqlTypeInfo function in RODBC package

2007-10-18 Thread Peter Holck
I'm a little confused about what I'm doing wrong using the setSqlTypeInfo function to modify character size output: setSqlTypeInfo(MySQL, + list(double=double, + integer=integer, + character=varchar(30), +

Re: [R] histogram labels

2007-10-18 Thread H. Paul Benton
Jim Lemon wrote: Hi Paul, It looks like you have a 1548 bar histogram, which means that you can't even resolve the bars on the standard display, much less annotate them. umm yes but I know that I only want to see everything from 0 : 150 so it's ends up only being 300bar's which I agree is

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread jim holtman
Here is an approach that will work as long as there are less than 32 unique characters in the strings. It uses logical operations to make the comparison library(bitops) x - scan(textConnection('a,b,c,d + a,b,c + b,c + a,b,c,d,e'), sep='\n', what='') Read 4 items x - strsplit(x, ',') x [[1]]

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread Weiwei Shi
The rule is search on any combinations whose size is more than 1, like ab, ac, abc, ... The storage can be like b2 b2 [[1]] [1] a b c d [[2]] [1] a b c [[3]] [1] b c [[4]] [1] a b c d e On 10/18/07, Nordlund, Dan (DSHS/RDA) [EMAIL PROTECTED] wrote: -Original Message- From:

Re: [R] histogram labels

2007-10-18 Thread hadley wickham
Hi Paul, Why do you want to do that? Maybe you could publish table along side your graph if you want people to be able to read the raw numbers. Hadley On 10/16/07, H. Paul Benton [EMAIL PROTECTED] wrote: Dear all, Just a quick one, hopefully. I have a histogram made from the method

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread Weiwei Shi
for example, a,b: 3 which means a and b appear together 3 times in my input list. On 10/18/07, jim holtman [EMAIL PROTECTED] wrote: It would be helpful if you explained what the numbers mean. On 10/18/07, Weiwei Shi [EMAIL PROTECTED] wrote: Hi, I am looking for an algorithm (better if

Re: [R] alignment algorithm or pattern frequency calculation

2007-10-18 Thread Weiwei Shi
the naive way is to exhausive search, but too bad for large and real situation. On 10/18/07, Weiwei Shi [EMAIL PROTECTED] wrote: for example, a,b: 3 which means a and b appear together 3 times in my input list. On 10/18/07, jim holtman [EMAIL PROTECTED] wrote: It would be helpful if you

[R] Rmpi and Ubuntu

2007-10-18 Thread Erin Hodgess
Dear R People: I am trying to put Rmpi with R-2.6.0 on an Ubuntu operating system. When I do the installation, all is well. But when I go into R and fire up the library, this is what I get: library(Rmpi) Error in dyn.load(file, ...) : unable to load shared library