Re: [R] Variance for Vector of Constants is STILL Not Zero

2006-02-17 Thread Thomas Lumley
On Fri, 17 Feb 2006, Barry Zajdlik wrote: > Hello all, > > Thanks for the responses but I am still annoyed by this seemingly simple > problem; I recorded sessionInfo() as below. > > x<-rep(0.02,10) >> var(x) > [1] 1.337451e-35 Well, yes, it is accurate only to 35 digits and this is a bit unfortuna

Re: [R] brookmeyer & crowley CI for median survival time

2006-02-16 Thread Thomas Lumley
On Thu, 16 Feb 2006, Jacqueline Hall wrote: > Hi all, > > Does anyone know if there is an implementation of Brookmeyer & Crowley's > confidence interval for the median survival time in R? > Reference : Brookmeyer & Crowley, "A confidence interval for the median > survival time" (1982) Biometircs

Re: [R] prediction function for clogit model

2006-02-16 Thread Thomas Lumley
On Thu, 16 Feb 2006, Arne Jol wrote: > Dear R-Help, > > I wonder if there is a prediction function for a clogit model which can be > used in the same way as the predict function for the multinom model. > > In prediction('multinommodel',testset ...) it is possible to predict the > class or the cla

Re: [R] how to retrieve robust se in coxph

2006-02-16 Thread Thomas Lumley
de.html -- ?? Deparment of Sociology Fudan University Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] how to retrieve robust se in coxph

2006-02-16 Thread Thomas Lumley
On Wed, 15 Feb 2006, Lei Liu wrote: > Hi, > > I am using coxph in simulations and I want to store the "robust se" (or > "se2" in frailty models) for each replicate. Is there a function to retrieve > it, like vcov() for the variance estimate? Thanks! > There isn't a function, so you need to extra

Re: [R] getting strata/cluster level values with survey package?

2006-02-15 Thread Thomas Lumley
tal( ~vol, srv1 ) ) > > I only obtain the total, > >> print( svytotal( ~vol, srv1 ) ) >total SE > vol 2377 34.464 > > or worse, > > print( svytotal( ~vol + strata, srv1 ) ) > total SE > vol 2377.0 34.464 > strataA 42.0 0.000 >

Re: [R] Survreg(), Surv() and interval-censored data

2006-02-15 Thread Thomas Lumley
On Mon, 13 Feb 2006, Stephen Richards wrote: > Can survreg() handle interval-censored data like the documentation > says? I ask because the command: > > survreg(Surv(start, stop, event) ~ 1, data = heart) > > fails with the error message > > Invalid survival type > > yet the documentation

Re: [R] wilcox.test returned estimates

2006-02-15 Thread Thomas Lumley
consider the distributions given by http://mathworld.wolfram.com/EfronsDice.html) However, the estimate is not the difference in sample medians. It is the median pairwise difference. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED

Re: [R] can I do this with read.table??

2006-01-26 Thread Thomas Lumley
On Thu, 26 Jan 2006, Douglas Grove wrote: > Hi, > > I'm trying to figure out if there's an automated way to get > read.table to read in my data and *not* convert the character > columns into anything, just leave them alone. What I'm referring > to as 'character columns' are columns in the data th

Re: [R] Data management problem: convert text string to matrix of 0's and 1's

2006-01-26 Thread Thomas Lumley
On Thu, 26 Jan 2006, Dale Steele wrote: > The data looks like: > --> > icsrvepf > fpevrsci > ics > p > > f > ic > <-- > > I would like to convert the about to a matrix of the form: > > i c s r v e p f > 1 1 1 1 1 1 1 1 > 1 1 1 1 1 1 1 1 > 1 1 1 0 0 0 0 0 > 0 0 0 0 0 0 1 0 > 0 0 0 0 0 0 0 0 >

Re: [R] cox.zph

2006-01-25 Thread Thomas Lumley
On Wed, 25 Jan 2006, singyee ling wrote: > Dear R-users, > > I am sorry if this is obvious. I am testing the proportional hazard > assumptions using cox.zph. If i am not wrong, a g(t) function must be > assumed. Four possibilities available in R are "km","identity" and "rank". > may i know what f

Re: [R] is.integer() function

2006-01-25 Thread Thomas Lumley
On Tue, 24 Jan 2006, Taka Matzmoto wrote: > Hi R users > I have a simple question to ask. > Why am I getting FALSE on this > >> is.integer(10) > [1] FALSE > > 10 is a integer number. is.integer() asks how a number is stored, not whether the number happens to be an integer. Explicit numbers type

Re: [R] importing a VERY LARGE database from Microsoft SQL into R

2006-01-25 Thread Thomas Lumley
On Wed, 25 Jan 2006, roger bos wrote: > > Does anyone have code that keeps generating random data until the memory is > full and then tells you how much memory was successfully used? I could try > writing it, but if someone has already done it, thats all the better! > In recent versions of R gc()

Re: [R] Number of replications of a term

2006-01-24 Thread Thomas Lumley
>>>> c( 1, 2, 2, 3,3,3,1 ) >>> >>> One-liner: >>> >>> > table(ids)[ids] >>> ids >>> ID1 ID2 ID2 ID3 ID3 ID3 ID5 >>> 1 2 2 3 3 3 1 >>> >>> 'table(ids)' computes t

Re: [R] Number of replications of a term

2006-01-24 Thread Thomas Lumley
i) ){ > >i <- i + 1 >} > >spotrep[spot : (spot + i-1)] <- i >spot <- spot + i >#cat("spot : ",spot,"\n") >} > >obj$genes$spotrep <- spotrep[order(ord)] > >obj

Re: [R] Number of replications of a term

2006-01-24 Thread Thomas Lumley
#cat("spot : ",spot,"\n") >} > >obj$genes$spotrep <- spotrep[order(ord)] > >obj > > } > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help >

Re: [R] Can R handle medium and large size data sets?

2006-01-24 Thread Thomas Lumley
ly than programming would, and have generally been correct. If you want Stata, you know where to find it (and it's a good choice for many problems). -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __

Re: [R] command in survival package

2006-01-23 Thread Thomas Lumley
On Mon, 23 Jan 2006, Linda Lei wrote: > Thank you guys. > But I tried the commands and I still get: > >> aml1<-aml[aml$group==1,] >> aml1 > [1] time status x > <0 rows> (or 0-length row.names) >> esf.fit <- survfit(Surv(aml1$weeks,status) ~ 1) > Error in Surv(aml1$weeks, status) : Time variable

Re: [R] command in survival package

2006-01-20 Thread Thomas Lumley
On Fri, 20 Jan 2006, Linda Lei wrote: > Hi there, > > > > I have a question about one command sentence when I follow the example > in the book of "Survival analysis in S": > > > aml1<-aml[aml$group==1] If this is really what the book says you should probably complain to the author. However, if

Re: [R] negative predicted values in poisson glm

2006-01-18 Thread Thomas Lumley
alues) > > > Thank you in advance for any hints. > Best regards, > P. Olsson > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLE

Re: [R] Own Color Palette

2006-01-18 Thread Thomas Lumley
On Wed, 18 Jan 2006, Robert Michael Rausch wrote: > I would like to generate a contour-plot according to a master plot. The > problem is that the rainbow-palette included in R does not answer this > purpose. I need a darker blue, no turquoise, relatively less green, more > yellow and more red. H

Re: [R] symbols function

2006-01-17 Thread Thomas Lumley
in symbols (...) > are not behaving as expected. > The ... argument is also passed to .Internal, and presumably the code there gives the warning. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __

Re: [R] multiple GLMs with lmList in lme4

2006-01-17 Thread Thomas Lumley
why lmList matches the linear fits rather than the GLM > fits would be greatly appreciated. I'm using R2.2.1 with lme version 0.98-1 > in Windows XP. > > Daniel Farewell > Cardiff University > > ______ > R-help@stat.math.ethz.ch mailing list > ht

Re: [R] importing from Stata

2006-01-17 Thread Thomas Lumley
rs. > I wonder if > > (i) there isn't a way of forcing each variable to be numeric or integer, > maintaining it's original values (instead of "Stata labels" as "R > levels"). Or, Yes. If you read the help page for read.dta() it tells you

Re: [R] SPSS and R ? do they like each other?

2006-01-11 Thread Thomas Lumley
and create SPSS variable and value labels. -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __________ R-help@stat.math.ethz.ch mailing list https

Re: [R] Wikis etc.

2006-01-09 Thread Thomas Lumley
On Mon, 9 Jan 2006, Michael Dewey wrote: > > Further to that I feel that (perhaps because they do not like to blow their > own trumpet too much) the authors of books on R do not stress how much most > questioners could gain by buying and reading at least one of the many books > on R. When I started

Re: [R] Problem with Integral of Indicator Function

2006-01-06 Thread Thomas Lumley
> > Any suggestions? > > Thanks. > > Harsh, > > > > > > - > > [[alternative HTML version deleted]] > > __________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listi

Re: [R] A comment about R:

2006-01-04 Thread Thomas Lumley
On Wed, 4 Jan 2006, Roger Bivand wrote: > Could I ask for comments on: > > source(url("http://spatial.nhh.no/R/etc/capabilities.R";), echo=TRUE) > > as a reproduction of the Stata capabilities session? Both the t test and > the chi-square from our side point up oddities. I didn't succeed on > putti

Re: [R] All possible subsets model selection using AICc

2006-01-03 Thread Thomas Lumley
us what that criterion is). These functions produce one or more best models of each size, and for models of the same size all the commonly-used criteria reduce to ranking by residual sum of squares, which is what leaps() and regsubsets() do. -thomas Thomas Lumley Assoc

Re: [R] p-value of Logrank-Test

2006-01-03 Thread Thomas Lumley
On Tue, 3 Jan 2006, Verena Hoffmann wrote: > Hello! > > I want to compare two Kaplan-Meier-Curves by using the Logrank-Test: > > logrank(Surv(time[b], status[b]) ~ group[b]) > > This way I only get the value of the test-statistic, but not the p-value. > > Does anybody know how I can get the p-valu

Re: [R] A comment about R:

2006-01-03 Thread Thomas Lumley
hes, the language was substantially reworked in both versions 8 and 9 to allow the vendor to implement better graphics and linear mixed models. On the question of which system really is easier to learn I can only comment that this isn't the only question where education, as a field, would

Re: [R] Package for multiple membership model?

2006-01-03 Thread Thomas Lumley
On Tue, 3 Jan 2006, Brian Perron wrote: > Hello all: > > I am interested in computing what the multilevel modeling literature > calls a multiple membership model. More specifically, I am working with > a data set involving clients and providers. The clients are the > lower-level units who ar

Re: [R] A comment about R:

2006-01-03 Thread Thomas Lumley
On Mon, 2 Jan 2006, Philippe Grosjean wrote: > > That said, I think one should interpret Mitchell's paper in a different > way. Obviously, he is an unconditional and happy Stata user (he even > wrote a book about graphs programming in Stata). His claim in favor of > Stata (versus SAS and SPSS, and

Re: [R] bug?

2005-12-15 Thread Thomas Lumley
file in the sources. Description: Functions for reading and writing data stored by statistical packages such as Minitab, S, SAS, SPSS, Stata, Systat, ..., and for reading and writing .dbf (dBase) files. License: GPL version 2 or later Packaged: Fri Dec 9 14:46:20 2005; ripley B

Re: [R] precision of rnorm

2005-12-15 Thread Thomas Lumley
On Thu, 15 Dec 2005, Phineas wrote: > How many distinct values can rnorm return? 2^32-1. This is described in help(Random) > I assume that rnorm manipulates runif in some way, runif uses the Mersenne > Twister, which has a period of 2^19937 - 1. Given that runif returns a 64 > bit precision fl

Re: [R] Looking for a sort of tapply() to data frames

2005-12-14 Thread Thomas Lumley
o read the posting guide! http://www.R-project.org/posting-guide.html Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailma

Re: [R] Problem with understanding output of Cox model

2005-12-13 Thread Thomas Lumley
On Tue, 13 Dec 2005, May, Roel wrote: > Hi all, > > I am using a 'tricked' Cox Hazard regression model for discrete choice > habitat modelling. > However, I'm having a hard time understanding the meaning of the first > line the following part of the summary() output: > > Rsquare= 0.307 (max possib

Re: [R] Incomplete Beta

2005-12-13 Thread Thomas Lumley
-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list

Re: [R] Looking for constrained optimisation code

2005-11-28 Thread Thomas Lumley
On Mon, 28 Nov 2005, Hong Ooi wrote: > > Hi, > > I was just wondering if there was any available R code that could handle > general constrained optimisation problems. At the moment I'm using > nlminb and optim, both of which allow box constraints on the parameters, > but ideally I'd like to be able

Re: [R] survdiff for Left-truncated and right-censored data

2005-11-23 Thread Thomas Lumley
___ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PR

Re: [R] residuals.coxph

2005-11-22 Thread Thomas Lumley
On Tue, 22 Nov 2005, giovanni parrinello wrote: > Dear All, > I am trying to apply the function 'cox.zph' of the library survival, but I > receive this error message: > not found the object 'residuals.coxph'. > I have re-installed the library 'survival' without any change and also a > search wit

Re: [R] about eval and eval.parent

2005-11-18 Thread Thomas Lumley
On Fri, 18 Nov 2005, ronggui wrote: > x<-1 > f<-function(){ > x<-3 > eval(substitute(x+y,list(y=10))) > } > f() #13 > > x<-1 > f<-function(){ > x<-3 > eval(substitute(x+y,list(y=10)), envir = sys.frame(sys.parent())) > } > f() #11 > > x<-1 > f<-function(){ > x<-3 > eval.parent(substitute(x+y,list(

Re: [R] loess: choose span to minimize AIC?

2005-11-17 Thread Thomas Lumley
> 4700 Keele Streethttp://www.math.yorku.ca/SCS/friendly.html > Toronto, ONT M3J 1P3 CANADA > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http:/

Re: [R] Error in integrate

2005-11-16 Thread Thomas Lumley
ames, variables, varnames, extras, > extranames, : >invalid variable type > === > > - Vivien Chen - > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > http

Re: [R] effect sizes for Wilcoxon tests

2005-11-15 Thread Thomas Lumley
On Tue, 15 Nov 2005, Claus Atzenbeck wrote: > On Tue, 15 Nov 2005, Peter Dalgaard wrote: > However, for Wilcoxon tests, the formula for effect sizes is: r = Z / sqrt(N) I wonder how I can calculate the Z-score in R for a Wilcoxon test. >>> >>> Does anyone know how to calculate

Re: [R] R for reliability analysis (with censored samples)?

2005-11-13 Thread Thomas Lumley
accelerated failure models to right/left/interval censored data. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list

Re: [R] different functions on different vector subsets

2005-11-11 Thread Thomas Lumley
not be made consistent across even the basic vector types. -thomas > Ron > >>>> Thomas Lumley <[EMAIL PROTECTED]> 11/10/05 11:02 PM >>> > On Thu, 10 Nov 2005, Ron Ophir wrote: > >> Thanks Thomas, >> >> "...For logical subscript

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Thomas Lumley wrote: > On Thu, 10 Nov 2005, Ron Ophir wrote: > >> Thanks Thomas, >> >> "...For logical subscripts you could argue that the >> ambiguity isn't present and that if the index was NA the element should >> just b

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Ron Ophir wrote: > Thanks Thomas, > > "...For logical subscripts you could argue that the > ambiguity isn't present and that if the index was NA the element should > just be set to NA. This change might be worth making." > > I see you got my point. NA should return NA no matte

Re: [R] order statistics / sample quantiles

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Bickel, David wrote: > Are there any R functions or packages that can compute distributions, > expectations, or quantiles of order statistics (or sample quantiles or > extreme values) for a given distribution such as a normal distribution? > Both exact and asymptotic calculati

Re: [R] different functions on different vector subsets

2005-11-10 Thread Thomas Lumley
On Thu, 10 Nov 2005, Ron Ophir wrote: > Hi, > I am trying to apply two different functions on on a vector as follow: > a<-c(NA,1,2,3,-3,-4,-6) > if a>0 I would like to raise it by the power of 2: 2^a and if the a<0 I > would like to have the inverse value, i.e., -1/2^a. > so I thought of doing it

Re: [R] Simple Nesting question/Odd error message

2005-11-08 Thread Thomas Lumley
On Mon, 7 Nov 2005, Jarrett Byrnes wrote: > I'm attempting to analyze some survey data comparing multiple docks. I > surveyed all of the slips within each dock, but as slips are nested > within docks, getting multiple samples per slip, and don't really > represent any meaningful gradient, slip is

Re: [R] Use of paste with apply()

2005-11-07 Thread Thomas Lumley
On Sun, 6 Nov 2005, Kjetil Brinchmann halvorsen wrote: > Why doesn't paste behave in apply as sum? > Because sum maps a vector of inputs to a single output, but paste does not, unless you use collapse= -thomas __ R-help@stat.math.ethz.ch mail

Re: [R] R seems to "stall" after several hours on a long series o f analyses... where to start?

2005-11-07 Thread Thomas Lumley
> PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/pos

Re: [R] question about precision, floor, and powers of two.

2005-11-04 Thread Thomas Lumley
On Fri, 4 Nov 2005, Uwe Ligges wrote: > Dr Carbon wrote: > >> At the risk of being beaten about the face and body, can somebody explain >> why the middle example: log2(2^3); floor(log2(2^3)) is different than >> examples 1 and 3? > > > Because > > > log2(2^3) - 3 > [1] -4.440892e-16 > This is a

Re: [R] Problems with pf() with certain noncentral values/degrees of freedom combinations

2005-11-03 Thread Thomas Lumley
> month10 > day 06 > svn rev 35749 > language R > > -- > Ken Kelley, Ph.D. > Inquiry Methodology Program > Indiana University > 201 North Rose Avenue, Room 4004 > Bloomington, Indiana 47405 > http://www.indiana.edu/~kenkel > > ___

Re: [R] Greek letters in plots

2005-11-01 Thread Thomas Lumley
plotmath that starts ## How to combine "math" and numeric variables : -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.m

[R] Re R Graphs in Powerpoint

2005-10-31 Thread Thomas Lumley
On Mon, 31 Oct 2005, Jarrett Byrnes wrote: > Hey, all. Quick question. I'm attempting to use some of the great > graphs generated in R for an upcoming talk that I'm writing in > Powerpoint. Copying and pasting (I'm using OSX) yields graphs that > look great in Powerpoint - until I resize them.

Re: [R] Import help (neophyte)

2005-10-31 Thread Thomas Lumley
On Mon, 31 Oct 2005, Jeffrey Stratford wrote: > Hi, I have no experience with R and I'm finding the manuals a bit obtuse > and written as if I already understood R. > > I'm trying to import a csv file from a floppy and it's not working. The > code I'm using is > > read.table("F:\GEORGIA\species_ri

Re: [R] Applying a function to a vector

2005-10-31 Thread Thomas Lumley
.R-project.org/posting-guide.html Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] identity matrix

2005-10-30 Thread Thomas Lumley
; [4,] -0.5898438 -0.2539063 3.592773 2.0351563 > 0.7849121 > [5,] 1.500 -1.1289063 -2.070313 -0.4003906 > 2.1386719 >> > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE d

Re: [R] Uncensoring a dataset - resent

2005-10-28 Thread Thomas Lumley
On Fri, 28 Oct 2005, Richard Reiss wrote: > > Does anyone know of an R package that I can use to uncensor a normal or > log-normal dataset? I'm particularly interested in the MLE method of > Cohen (1959), "Simplified estimators for the normal distribution when > samples are single censored or trun

Re: [R] outer-question

2005-10-27 Thread Thomas Lumley
mp(alphas=possible.alphas[3], betas=possible.betas[11], > timep=lifetimes) > > > ### I'd appreciate any kind of advice. > ### Thanks a lot in advance. > ### Roland > > > + > This mail has been sent through the MPI for Demographic Rese...{{dropp

Re: [R] forrest plot

2005-10-20 Thread Thomas Lumley
Tel 0543-731836 Tel/Fax 0543-731612 ** [[alternative HTML version deleted]] Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@s

Re: [R] forrest plot

2005-10-19 Thread Thomas Lumley
f lines. Lewis S, Clarke M. Forest plots: trying to see the wood and the trees. BMJ 2001;322:1479-80." -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle ___

Re: [R] loading packages - mac user

2005-10-18 Thread Thomas Lumley
in: make.packages.html() > Error: .onLoad failed in 'loadNamespace' for 'tcltk' > Error: package 'tcltk' could not be loaded > > __ > R-help@stat.math.ethz.ch mailing list >

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Thomas Lumley
On Wed, 19 Oct 2005, Tim Churches wrote: > MJ Price, Social Medicine wrote: >> I have been trying to find a function to calculate the Breslow-Day test for >> homogeneity of the odds ratio in R. I know the test can be preformed in SAS >> but i was wondering if anyone could help me to perform this i

Re: [R] extracting from data frame multiple times

2005-10-14 Thread Thomas Lumley
On Fri, 14 Oct 2005, Ido M. Tamir wrote: > Hello, > i am trying to subset a dataframe multiple times: > something like: > > stats <- by(df, list(items), ttestData) > > ttestData <- function(df){ >t.test( df[,c(2,3,4), df[,c(5,6,7)] > } > > While this works for small data, it is to slow for my

Re: [R] Logistic Regression using glm

2005-10-11 Thread Thomas Lumley
> R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University o

Re: [R] problem with lapply(x, subset, ...) and variable select argument

2005-10-11 Thread Thomas Lumley
On Tue, 11 Oct 2005, joerg van den hoff wrote: > many thanks to thomas and gabor for their help. both solutions solve my > problem perfectly. > > but just as an attempt to improve my understanding of the inner workings of R > (similar problems are sure to come up ...) two more question: > > 1. >

Re: [R] problem with lapply(x, subset, ...) and variable select argument

2005-10-10 Thread Thomas Lumley
orce evaluation of the variable n such that > the lapply call works? I suspect it has something to do with eval and > specifying the correct evaluation frame, but how? > > > many thanks > > joerg > > ______ > R-help@stat.math.e

Re: [R] Question about Survey Package

2005-10-10 Thread Thomas Lumley
284) and to a ratio estimator svyratio(~as.numeric(y1*(id2>1)), ~as.numeric(id2>1), design=dmu284) All three give the same mean estimator and standard error. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED]

Re: [R] Matrix calculations in R--erroneous?

2005-10-09 Thread Thomas Lumley
On Fri, 7 Oct 2005, Peter Muhlberger wrote: > > The max function won't do the trick because I need the entire matrix. I > could do one cell at a time, but this is part of a ML routine that needs to > be evaluated hundreds of thousands of times, so I can't afford to slow it > down that much. pmax,

Re: [R] Matrix calculations in R--erroneous?

2005-10-07 Thread Thomas Lumley
On Fri, 7 Oct 2005, Peter Muhlberger wrote: > Does anyone know how -log(x) can equal 743 but -log(x+0)=Inf? That's what > the following stream of calculations suggest: > > Browse[2]> -log ( 1e-323+yMat2 - yMat1 * logitShape(matrix(parsList$Xs, > nrow = numXs, ncol=numOfCurves), matrix(means, nr

Re: [R] Testing strata by covariate interactions in coxph

2005-10-06 Thread Thomas Lumley
On Thu, 6 Oct 2005, Pyy-Martikainen Marjo wrote: > I specify a model with strata by covariate interactions. I would like to > conduct a Wald test > for the null hypothesis "no differences between any covariate effects in the 3 > groups". The "survey" package has a function regTermTest (which isn

Re: [R] (no subject)

2005-10-05 Thread Thomas Lumley
rr(X,Y)= ",(covxy/(varx*vary)^.5))) > > print("NOTE -sqrt(varx*vary)<=covxy<=sqrt(varx*vary)") > #print(A) > } > BINORMAL(varx=1,vary=1,covxy=0,meanx=0,meany=0) > > thanx > > /allan > > ___

Re: [R] "Survey" package and NAMCS data... unsure of specification

2005-10-04 Thread Thomas Lumley
On Tue, 4 Oct 2005, David L. Van Brunt, Ph.D. wrote: > Hello, all. > > I wanted to use the "survey" package to analyze data from the National > Ambulatory Medical Care Survey, and am having some difficulty translating > the analysis keywords from one package (Stata) to the other (R). The data > we

Re: [R] help with loading National Comorbidity Survey

2005-10-04 Thread Thomas Lumley
On Sat, 1 Oct 2005, Jim Hurd wrote: > > Which provides data in DTA (STATA), XPT (SAS), and POR (SPSS) formats all > of which I have tried to read with the foreign package but I am not able to > load any of them. I have 2 gb of RAM, but R crashes when the memory gets > just over 1 GB. I am using Wi

Re: [R] boxplot statistics

2005-10-04 Thread Thomas Lumley
On Tue, 4 Oct 2005, Karin Lagesen wrote: > > First, how does boxplot determine the size of the box? And is the line > inside the box the mean or the median (or something completely > different?) And how does it determine how long out the whiskers should > go? Part of the problem is that there are

Re: [R] C program

2005-09-30 Thread Thomas Lumley
On Fri, 30 Sep 2005, Erin Hodgess wrote: > Dear R People: > > I have R Version 2.1.1. for Windows in binary form. > > I would like to look at the C code for massdist. It is part > of the density function. > The .C() call shows that massdist is in the base package. This means that it is likely t

Re: [R] Dots in function names

2005-09-30 Thread Thomas Lumley
On Fri, 30 Sep 2005, Mike Prager wrote: > Recent R function names seem to be using CaseOfTheLetters to mark words > rather than dots as was done previously. Is the use of dots in function > names deprecated, or is that simply a style choice? Will function names > with dots cause problems in futu

Re: [R] regsubsets selection criterion

2005-09-29 Thread Thomas Lumley
On Thu, 29 Sep 2005, Spencer Graves wrote: > Questions like this are best directed to the package maintainer(s). > From help(package="leaps"), I learned that Thomas Lumley is the author and > maintainer for "leaps"; I'm including him as a '

Re: [R] reshaping data?

2005-09-29 Thread Thomas Lumley
On Thu, 29 Sep 2005, Karin Lagesen wrote: > > I have a file like this: > > > a 0.1 > a 0.2 > a 0.9 > b 0.5 > b 0.9 > b 0.7 > c 0.6 > c 0.99 > c 0.88 > > Which I would like to get to be the following matrix: > > 0.1 0.20.30.4 .

Re: [R] p-level in packages mgcv and gam

2005-09-28 Thread Thomas Lumley
On Wed, 28 Sep 2005, Denis Chabot wrote: > But what about another analogy, that of polynomials? You may not be sure what > degree polynomial to use, and you have not decided before analysing your > data. You fit different polynomials to your data, checking if added degrees > increase r2 suffici

Re: [R] p-level in packages mgcv and gam

2005-09-28 Thread Thomas Lumley
listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle__ R-help@stat.math.ethz.ch mailing list h

Re: [R] Weighting factor

2005-09-27 Thread Thomas Lumley
On Tue, 27 Sep 2005, Ferran Carrascosa wrote: > Hi everyone, > > I would like some package of R or any help to solve the next problem > with a weighting fatcors: > > Giving a data matrix with dichotomous (2 or more) variables in columns > and individuals in rows, and also a theorical distribution

Re: [R] negative binomial in GEE

2005-09-27 Thread Thomas Lumley
On Tue, 27 Sep 2005, Simon.Bond wrote: > > Does anyone have any suggestions for a way round this problem for the > future (I had to resort to using Stata), or maybe more realistically, how > much work it would take to build an extendible version of the gee > "algorithm"? > I don't think it would

Re: [R] regsubsets selection criterion

2005-09-27 Thread Thomas Lumley
On Tue, 27 Sep 2005, Samuel Bertrand wrote: > Hello, > > I am using the 'regsubsets' function > (from leaps package) > to get the best linear models > to explain 1 variable > from 1 to 5 explanatory variables > (exhaustive search). > > Is there anyone who can tell me > on which criterion is based

Re: [R] p-level in packages mgcv and gam

2005-09-26 Thread Thomas Lumley
On Mon, 26 Sep 2005, Denis Chabot wrote: > > But the mgcv manual warns that p-level for the smooth can be > underestimated when df are estimated by the model. Most of the time > my p-levels are so small that even doubling them would not result in > a value close to the P=0.05 threshold, but I have

Re: [R] Problem with read.spss() and as.data.frame(), or: alternative to subset()?

2005-09-23 Thread Thomas Lumley
he problem, and show us that one, > e.g. by making it available via http://... if it is still large, > otherwise (if it's small), maybe even posting the result of > dump(..). > > Regards, > Martin > > __ > R-help@stat.math.ethz.ch mailing list > https://s

Re: [R] (survexp:) compute the expected remaining survival time

2005-09-22 Thread Thomas Lumley
On Thu, 22 Sep 2005, Anne wrote: > DeaR list > I would like to know if there is a direct method to compute the > expected remaining survival time for a subject having survived up to > time t. survexp gives me the probabilty for subject S to survive up to > day D You can't estimate expected surv

Re: [R] coxph.detail() does not work

2005-09-13 Thread Thomas Lumley
On Tue, 13 Sep 2005, Zhen Zhang wrote: > Hello everyone, > > I tried to use coxph.detail() to get the hazard function. But a warning > messge always returns to me, even in the example provided by its help > document: > >> ?coxph.detail >> fit <- coxph(Surv(futime,fustat) ~ age + rx + ecog.ps, o

Re: [R] Floating-point arithmetic

2005-09-13 Thread Thomas Lumley
On Tue, 13 Sep 2005, [EMAIL PROTECTED] wrote: > A recent exchange on the 'octave' list led to the following > paper being cited, which I had not met before: > > What Every Computer Scientist Should Know About > Floating-Point Arithmetic, by David Goldberg, > > So I'm writing to bring it to the n

Re: [R] Bonferroni test?

2005-09-12 Thread Thomas Lumley
On Mon, 12 Sep 2005, Chris Buddenhagen wrote: > > Is there a simple means of doing this multiple comparison test in R? > p.adjust() -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] poisson mean hypothesis

2005-09-12 Thread Thomas Lumley
2 (0)16 322831 >> <http://www.kuleuven.be/ucs> http://www.kuleuven.be/ucs >> >> >> >> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm >> >> >> [[alternative HTML version deleted]] >> >> _______

Re: [R] Output of warnings inside the source function

2005-09-11 Thread Thomas Lumley
On Sun, 11 Sep 2005, Arkady Sherman wrote: > > "c:\Program Files\R\rw2011\bin\R.exe" --no-save < test > out.txt > > the file "c:/temp/foo.txt" will contain nothing. > But I'd like it should contain the warning message "Foo warning". > Is the behavior a bug of R or there is another way to get it wor

[R] [R-pkgs] survey: version 3.3

2005-09-10 Thread Thomas Lumley
http://faculty.washington.edu/tlumley/survey/NEWS -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.

Re: [R] change in read.spss, package foreign?

2005-09-09 Thread Thomas Lumley
On Fri, 9 Sep 2005, Heinz Tuechler wrote: > Dear Martin, > Thank you for your answer. As I said, I appreciate this change. The > documentation does not explain precisely, how variables with labels are > treated now. It only tells "If SPSS value labels are converted to factors > the underlying numer

Re: [R] change in read.spss, package foreing?

2005-09-09 Thread Thomas Lumley
n SPSS (we can't be sure that this is always true since the file format is undocumented). > However I could not find a description of this supposed change. It's in the ChangeLog file in the foreign package. -thomas Thomas Lumley Assoc. Prof

Re: [R] data manipulation

2005-09-08 Thread Thomas Lumley
X1 or X2... > > Many thanks in advance, > > Bernard > > > - > > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help >

<    1   2   3   4   5   6   7   8   9   10   >