Re: [R] Finding all overlaps between two sets of 1-Dimensional regions

2005-09-03 Thread Charles C. Berry
On Fri, 2 Sep 2005, Sean Davis wrote: > I have a simply defined regions ([start,end] where start large sets of them and want to find all regions in the first that overlap > any regions in the second. The closest I could find by searching is > overlap.owin in I can do this by looping, but there is

Re: [R] under sample problem

2005-09-03 Thread Spencer Graves
Does the following help: > set.seed(1) > pop <- 1:100 > s1 <- sample(pop, 5) > s1. <- pop[!(pop %in% s1)] > s2 <- sample(s1., 5) > s1 [1] 27 37 57 89 20 > s2 [1] 91 94 66 62 6 > spencer graves [EMAIL PROTECTED] wrote: > > Hello, > I have a problem to treat my dat

Re: [R] loglinear model selection

2005-09-03 Thread Spencer Graves
Does the following help you: library(MASS) set.seed(1) x1 <- rep(1:2, 2) x2 <- rep(1:2, each=2) DF <- data.frame(x1=x1, x2=x2, y=rbinom(4, 1000, prob=(x1+x2-1.5)/3)/1000) fit0 <- glm(y~1, family=binomial, data=DF, weights=rep(1000, 4)) stepAIC(fit0, y~x1+x2)

[R] survey weights

2005-09-03 Thread A Das
Hi all, I've been trying to get a large (12mb) Stata survey database into R. I managed that, but when I attach survey weights, something goes wrong. The error message is: object dchina not found. Here's the script: library(car) library(foreign) library(survey) China <- read.dta("C:/final07c2.dta"

Re: [R] lme and ordering of terms

2005-09-03 Thread Spencer Graves
Since I have not seen a reply to this question, I will offer something: The problem with testing interactions before main effects is that it's not clear what interactions even mean without the main effects. This is true in virtually any context, not just lme. Consider the

Re: [R] R binaries, platform independent and Design of Experiments

2005-09-03 Thread Nam-Ky Nguyen
> On 02/09/05, Nam-Ky Nguyen <[EMAIL PROTECTED]> wrote: >> > b) You do NOT want to do numerical computations on software available >> in >> > Java byte code. >> You do not want to do heavy numerical computations with R either. Most >> statistical calculation using R requires a fraction of a second

Re: [R] R-square n p-value

2005-09-03 Thread Dirk Eddelbuettel
On 3 September 2005 at 17:59, Justin Rhodes wrote: | Dear R-help, | | Can someone please help me discover what function or code will give | me a p-value from the input: 1) R-square statistic from a simple | linear regression, and 2) sample size, n | | This would be greatly appreciated. I need

[R] R-square n p-value

2005-09-03 Thread Justin Rhodes
Dear R-help, Can someone please help me discover what function or code will give me a p-value from the input: 1) R-square statistic from a simple linear regression, and 2) sample size, n This would be greatly appreciated. I need this because I am using a database that gives me R-square and sa

Re: [R] Inconsistence in specifying action for missing data

2005-09-03 Thread Martin Maechler
> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]> > on Sat, 03 Sep 2005 11:40:18 -0400 writes: Duncan> John Sorkin wrote: >> A question for R (and perhaps S and SPlus) historians. >> >> Does anyone know the reason for the inconsistency in the >> way that the action

Re: [R] C-index : typical values

2005-09-03 Thread Frank E Harrell Jr
Adaikalavan Ramasamy wrote: > Thank you ! So to be absolutely sure, the C-index in my case is > 0.5 * ( 0.3634 + 1 ) = 0.6817 right ? correct > > If the above calculation is correct then why do I get the following : > > rcorr.cens( predict(fit), Surv( GBSG$rfst, GBSG$cens ) )[ "C Index" ]

[R] producing SVG files

2005-09-03 Thread Adrian DUSA
I am trying to use the RSvgDevice package to produce some SVG graphs which I want to edit with Inkscape 0.42. Under Linux (Kubuntu 5.04) I use the following: library(RSvgDevice) plot(1:10, 1:10) devSVG(file = "/home/adi/Rplots.svg", width = 10, height = 8, bg = "white", fg = "black", onefile=TRU

Re: [R] producing SVG files

2005-09-03 Thread Adrian DUSA
Adrian DUSA gmail.com> writes: > I am trying to use the RSvgDevice package to produce some SVG graphs which I > want to edit with Inkscape 0.42. > [...snip...] Argh, a minute after posting a find out the solution here: http://www.stat.auckland.ac.nz/~paul/Talks/gridSVG/slide8.html It works bri

Re: [R] Inconsistence in specifying action for missing data

2005-09-03 Thread Duncan Murdoch
John Sorkin wrote: > A question for R (and perhaps S and SPlus) historians. > > Does anyone know the reason for the inconsistency in the way that the > action that should be taken when data are missing is specified? There > are several variants, na.action, na.omit, "T", TRUE, etc. I know that a >

[R] Inconsistence in specifying action for missing data

2005-09-03 Thread John Sorkin
A question for R (and perhaps S and SPlus) historians. Does anyone know the reason for the inconsistency in the way that the action that should be taken when data are missing is specified? There are several variants, na.action, na.omit, "T", TRUE, etc. I know that a foolish consistency is the hob

Re: [R] C-index : typical values

2005-09-03 Thread Adaikalavan Ramasamy
Thank you ! So to be absolutely sure, the C-index in my case is 0.5 * ( 0.3634 + 1 ) = 0.6817 right ? If the above calculation is correct then why do I get the following : rcorr.cens( predict(fit), Surv( GBSG$rfst, GBSG$cens ) )[ "C Index" ] C Index 0.3115156 ( I am aware that is a re

[R] DESIGN package psm function

2005-09-03 Thread denis lalountas
Hi ti all, I am using psm() function of the Design package with dist=' weibull '. I think that Design uses the following weibull R*L*(R*L)^(R-1). Using psm() with dist= "weibull" I get estimates of Log(scale) and intercept . Does anybody knows the relation between R, L and intercept and scale pa

Re: [R] Problems plotting time-series with multiple lines

2005-09-03 Thread Felipe Csaszar
He you checked this example?: z <- ts(matrix(rt(200 * 8, df = 3), 200, 8), start = c(1961,1), frequency = 12) z <- window(z[, 1:3], end = c(1969, 12)) plot(z, plot.type = "single", lty = 1:3, col = 4:2) It is from the help page of plot.ts Felipe "Jose Augusto Jr - jamaj - terra" <[EMAIL PROTEC