similar to: sequential treatment of a vector for formula

Displaying 20 results from an estimated 300 matches similar to: "sequential treatment of a vector for formula"

2011 May 26
5
Survival: pyears and ratetable: expected events
Dear all, I am having a (really) hard time getting pyears to work together with a ratetable to give me the number of expected events (deaths). I have the following data: dos, date of surgery, as.Date dof, date of last follow-up, as.Date dos, date of surgery, as.Date sex, gender, as.factor (female,male) ev, event(death), 0= censored at time point dof, 1=death at time point dof Could someone
2011 Jul 13
2
life table and Kaplan-Meier
Hello, I have a question about the function lifetab in package KMsurv. The description of the output value surv says "the estimated survival function at the start of the intervals". Are these estimates the ones calculated via Kaplan-Meier probability of survival ? Thanks in advance! -- View this message in context:
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
Dear R-users, I would like to show you a simple example that gives an overview of one of my current issue. Although my working setting implies a different parametric model (which cannot be framed in the glm), I guess that what I'll get from the following example it would help for the next steps. Anyway here it is. Firstly I simulated from a series of exposures, a series of deaths (given a
2011 Jul 09
3
Basic vector logic not working
I am interning in a computer science lab and I'm very new to R. The language basics are clear, but this particular problem isn't: I have a very large dataframe called "data" which holds data from Halo matches. I'm trying to analyze a certain window such that data$deaths>20 and data$deaths<=27. When I enter the line kills = data$kills[data$deaths>20] or any single
2009 Sep 01
2
Basic population dynamics
Hello, For insect mortality data I'm trying to get an R script that will take the data from the raw form and convert it to Lx (% survival) for a number of treatments. The raw data has the number of days lived for each individual for the respective treatment. Thus, for example, when R selects the data for a single treatment I end up with the following vectors: >day=seq(from=0,to=6)
2004 Jan 01
1
Barplot errors in MASS script
Reading "Modern Applied Statististics with S" and trying the corresponding examples both in the book and in ../lib/R/library/MASS/script, I'm now trying chapter 4 plotting bars with the following code on a linux box with R 1.8.1: ---------------------- library(MASS) library(lattice) options(echo=T, width=65, digits=5) lung.deaths <- aggregate(ts.union(mdeaths, fdeaths), 1)
2007 May 01
1
Levels attribute in integer columns created by model.frame()
The following is evidence of what is surely an undesirable feature. The issue is the handling, in calls to model.frame(), of an explanatory variable that has been derived as an unclassed factor. (Ross Darnell drew this to my attention.) ## Data are slightly modified from p.191 of MASS > worms <- data.frame(sex=gl(2,6), Dose=factor(rep(2^(0:5),2)), +
2003 Mar 10
1
Problem with example(medpolish) in R-devel
Today's R-devel has a problem in `example(medpolish)'. It appears that the `plot.medpolish' method is not available. Here is the output and traceback() after starting `R --vanilla': > library(eda) > example(medpolish) mdplsh> deaths <- rbind(c(14, 15, 14), c(7, 4, 7), c(8, 2, 10), c(15, 9, 10), c(0, 2, 0)) mdplsh> dimnames(deaths) <-
2001 Nov 24
2
horsekicks
Dear friends. I have these well known data on horsekicks: years <- c(109, 65, 22, 3 , 1, 0) deaths <- 0:5 and get a nice but wrong fit from summary(z1 <- glm(years~deaths,family=poisson)) Can I take away the intercept ? Best wishes Troels Ring, Aalborg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2011 Jul 24
1
Histogram of a dataframe subset failing
Like most help forum users, I'm very new to R. I've been having this problem: I started with a dataframe called fullData. With the subset command, I split it into two separate dataframes, soloData and teamData. The hist() function works when I use... hist( subset(fullData, fullData$playlist_id==4 )$deaths) ...the exact call to subset() that I used to create each dataframe. However,
2009 Nov 14
2
formatting dates in axis labels (ggplot2)
I'm having trouble figuring out how to format Date variables when used as axis labels in graphs. The particular case here is an attempt to re-create Nightingale's coxcomb graph with ggplot2, where I'd like the months to be labeled as "Mar 1885", "Apr 1885", using a date format of "%b %Y" applied to label the dates, or really anything other than
2006 Jul 21
1
Parameterization puzzle
Consider the following example (based on an example in Pat Altham's GLM notes) pyears <- scan() 18793 52407 10673 43248 5710 28612 2585 12663 1462 5317 deaths <- scan() 2 32 12 104 28 206 28 186 31 102 Smoke <- gl(2,1,10,labels=c("No","Yes")) Age <- gl(5,2,10,labels=c("35-44","45-54","55-64","65-74","75-84"),
2008 Mar 31
5
[LLVMdev] Additional Optimization I'm Missing?
Hello, I'm working on using the LLVM JIT for a little project of mine, amazing work first off! I have a question about optimization passes. I initially have this function I've created, in python it looks like this: OS_end = 50OS_start = 0OS_timestep = 1birth_rate = .3population = 30.0for time in range(OS_start, OS_end, OS_timestep): births = birth_rate * population deaths = 0.1
2009 Oct 09
1
svy / weighted regression
Dear list, I am trying to set up a propensity-weighted regression using the survey package. Most of my population is sampled with a sampling probability of one (that is, I have the full population). However, for a subset of the data I have only a 50% sample of the full population. In previous work on the data, I analyzed these data using SAS and STATA. In those packages I used a propensity weight
2001 Mar 21
2
LR-based CIs for GLMs
We are using glm() to models to counts of deaths due to rare causes using a log link and Poisson error distribution, with population as the offset. Approximate confidence intervals for the parameter estimates are easy to calculate using a standard normal deviate, but obviously when the counts of deaths are small (which is why we are using Poisson regression), these intervals are very approximate
2011 Apr 10
1
demography's lifetable: how to incoporate the parameter "franction of last age interval of life"
Dear list: I have tried demography package in my Ubuntu(10.04). What I interested in was lifetable analysis. Chiang(1984)'s reference have been copied to steeper my learning curve. step by step, the example presented by the textbook also have been examined. In the course I find that the paramter "fraction of last age intervl of life" could not be take as a option in the module
2006 Sep 20
2
Poission distribution
The expected number of bladder cancer over next 20 years a tire industry is 1.8. Poission distribution is assumed to hold and 6 reported deaths are caused by bladder cancer among the employees. Trying to find how unusual this event is. > ppois(q=6, lambda=1.8, lower.tail = TRUE, log.p = FALSE) [1] 0.9974306 not sure if ppois is the right one to use and the parameters... thx much
2000 Oct 25
1
lifetable, survivorship.. [forwarded message from Diana Fischer]
This was accidentally addressed to me, personally: ------- start of forwarded message ------- Message-id: <39F70D7C.287323D5 at yale.edu> MIME-version: 1.0 From: Diana Fischer <diana.fischer at yale.edu> To: maechler at stat.math.ethz.ch Subject: R-Project Date: Wed, 25 Oct 2000 11:42:36 -0500 I briefly looked at the R documentation of available statistical procedures. It appears
2004 Nov 10
1
Additions to the datasets package?
I have posted, at http://wwwmaths.anu.edu.au/~john/r/newsets/ image (.rda) files, and first stabs at .Rd files for various data on deaths in London from 1629 to 1939. (There are of course gaps.) The sources (Guy 1882 & Stocks 1942) are documented in the .Rd files: (1) poxetc: measles, smallpox & total deaths: 1629-1881 [I have deliberately left several inconsistencies that were in
2010 Jun 21
1
using table and tapply?
Dear R People: Here is a little section of a data frame: > zzz[1:10,] DATE GENDER AGE Co DEATH1 3945 2009-04-16 M 24 Botulinic 23 3851 2009-04-16 M 35 Constitutional 23 8495 2009-04-16 F 49 Constitutional 27 10967 2009-04-16 F 47 Constitutional 28 11164 2009-04-16 F 26 Constitutional 28 15220