similar to: Cox Proportional Hazards model with a time-varying covariate

Displaying 20 results from an estimated 800 matches similar to: "Cox Proportional Hazards model with a time-varying covariate"

2011 Jun 13
0
Setting up counting process data for survival analysis
Hello Everyone, I'm learning to do survival analysis in R using a time-varying covariate. I've managed to set up my data correctly using SAS and then to get the correct result using R. What I'd like help with is getting the data set up correctly in R without having to resort to using SAS. Below are two datasets. The first is the raw data I'm starting out with. The second is set
2006 Apr 07
2
Some quick mrtg help
Ok, I'm having a major brain hemorrhage or something. I just can't get mrtg setup on my box. I've done it before and it's not like it's brain surgery but there's a mental block or something that I just can't get around. All I want to do is have a nice, simple graph of the traffic on the box and the gateway in the standard day/week/month/year thing. I've got the
2008 Apr 02
1
Using special characters in query terms
Hi, I would like to search for filenames in a xapian database. For now my query for "foo-bar.po" turns into the following: Xapian::Query((foo:(pos=1) PHRASE 3 bar:(pos=2) PHRASE 3 po:(pos=3))) This query is successful, if I used the term generator to tokenize "foo-bar.po" during indexing. The problem is: this workaround makes it impossible to distinguish between
2010 Jun 22
2
constructing a data frame from ftable
Dear R People: I have the following data set with the columns DATE, GENDER, and Co. Co has 8 possible options. > a.df[1:10,] DATE GENDER Co 1 2009-04-16 F Rash 2 2009-04-16 F Other 3 2009-04-16 M Botulinic 4 2009-04-16 M Other 5 2009-04-16 M Constitutional 6 2009-04-16 F Other 7 2009-04-16
2006 Mar 24
0
Random covariate in survreg (Survival)
Dear R Listers- I am attempting to analyse the survival of seeds in cages (exclosures) that differ in their permeability to rainforest mammals. Because I did not observe the moment of seed disappearance, my data is interval censored. This limits my options for analysis (as I understand it) to survreg, in the survival package. Because I repeated the experiment in 8 sites, I have a random
2010 Dec 05
0
Help with time varying covariate-unfold function
Hello All, I am trying to use the unfold function in RcmdrPlugin.survival library, which converts the survival data with time varying covariates to the counting process notation. The problem is somehow, the event indicator created is not correct. Below is the data, I am trying to convert: CASE TRT FAILTIME FAILCENS SEX AGE IGG0 IGG28 IGG42 IGG84 IGG364 26003 A 11.2033
2011 Nov 16
2
Error in random walk Metroplis-hasting
Hi R community, I have some data set and construct the likelihood as follows likelihood <- function(alpha,beta){ lh<-1 d<-0 p<-0 k<-NULL data<-read.table("epidemic.txt",header = TRUE) attach(data, warn.conflicts = F) k <-which(inftime==1) d <- (sqrt((x-x[k])^2+(y-y[k])^2))^(-beta) p<-1 - exp(-alpha*d) for(i in 1:100){
2011 Jan 26
1
return object from loop inside a function
Hi All, I have a for loop inside the function and I cannot get UUU to give me an updated grid.dens object when I run the function (it does update when I run just the for loop). Here's a simplified version of my function: UUU=function(pop, grid.dens) { for (i in 1:10){ Food=grid.dens[pop$yloc[i],pop$xloc[i]] #use initial grid.dens values Consumed=(pop$weight[i]*0.25) Left=Food-Consumed
2009 Mar 02
1
handle graph size in eps
Hi all, I've got a density graph made with the following commands: win.graph(width=13,height=6) par ( fin=c(13,3) ,mai=c(1,1,0.5,0.5) ,mfrow=c(1,2) ,cex.axis=1.5 ,cex.lab=1.5) dens<-density(DATA1.y[2,]-mean(DATA1.y[2,]),kernel="gaussian") xlimit<-range(dens$x) ylimit<-range(dens$y) hist( DATA1.y[2,]-mean(DATA1.y[2,]) ,xlim=1.1*xlimit ,xlab=expression(q[e])
2010 Mar 30
1
hist.default()$density
Dear developers, the current implementation of hist.default() calculates 'density' (and 'intensities') as dens <- counts/(n*h) where h has been calculated before as h <- diff(fuzzybreaks) which results in 'fuzzy' values for the density, see e.g. > tmp <- hist(1:10,breaks=c(-2.5,2.5,7.5,12.5),plot=FALSE) > print(tmp$density,digits=15) [1]
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
2007 Feb 12
0
Colouring the polygons, correlation matrix
Hello, Below a modified function for displaying a correlation matrix by Vincent Zoonekynd posted in his excellent tutorial. Compared to the matrix and the legend, the colouring of the polygons is wrong. The error is in the sequence: col=col[N*(mat[i,j]+1)/2]. I cannot seem to devise a sequence which will make the colouring consistent with that in the legend. Can you help? The number of different
2007 Feb 20
1
Simplification of Generalised Linear mixed effects models using glmmPQL
Dear R users I have built several glmm models using glmmPQL in the following structure: m1<-glmmPQL(dev~env*har*treat+dens, random = ~1|pop/rep, family = Gamma) (full script below, data attached) I have tried all the methods I can find to obtain some sort of model fit score or to compare between models using following the deletion of terms (i.e. AIC, logLik, anova.lme(m1,m2)), but I
2012 Mar 25
0
sm.density kernel estimation for points
Hi! I have two dimensional dataset which has and I need to decide if a point lies in some "confidence level". If a point has low confidence/density it can be anomaly which I need to find. For example: #load library library(sm) #get some data x.locs = c(74, 74.5, 75, 77,74.5) y.locs = c(64, 63.5, 63, 61,61.5) points = cbind(x.locs, y.locs) #plot it plot(points) #get points density
2009 Aug 19
1
Fw: Hist & kernel density estimates
For the hist estimate >par(mex=1.3) >dens<-density(q) >options(scipen=4) > ylim<-range(dens$y) > h<-hist(q,breaks="scott",freq=FALSE,probability=TRUE, +? right=FALSE,xlim=c(9000,16000),ylim=ylim,main="Histogram of q(scott)") > lines(dens) >box() ? For the kernel estimate>options(scipen=4) > d <- density(q, bw =
2018 Mar 07
0
ggplot2: plot gruped/nested split violins
Hi, I posted this on StackOverflow also but did not get a response so I thought that I would also try luck here. The post is at: https://stackoverflow.com/questions/49120060/ggplot2-display-blocks-of-nested-split-violins Basically, I have the following test example: --cut-and-paste-from-here-on df <- data.frame(dens = rnorm(5000), split = as.factor(sample(1:2, 5000, replace =
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2008 Jul 17
0
How to compute loglikelihood of Lognormal distribution
Hi, I am trying to learn lognormal mixture models with EM. I was wondering how does one compute the log likelihood. The current implementation I have is as follows, which perform really bad in learning the mixture models. __BEGIN__ # compute probably density of lognormal. dens <- function(lambda, theta, k){ temp<-NULL meanl=theta[1:k] sdl=theta[(k+1):(2*k)]
2010 Mar 22
0
superfluous distribution found with mclust
Dear R users, I use mclust to fit a mixture of normal distributions to many datasets. Usually the Mclust function finds 1 or two normal distributions, rarely, 3. But I hit a strange case today. my.data <- c(57.96920, 51.79415, 51.20538, 55.53637, 51.64291, 56.61476, 51.28855, 55.56169, 51.85113, 54.03330, 51.37370, 49.48561, 52.41580, 53.51176, 60.49293, 55.77012, 51.59270, 56.29660,
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members, I have read your article "Network meta-analysis for indirect treatment comparisons" (Statist Med, 2002) with great interest. I found it very helpful that you included the R code to replicate your analysis; however, I have had a problem replicating your example and wondered if you are able to give me a hint. When I use the code from the