search for: riskfactor

Displaying 3 results from an estimated 3 matches for "riskfactor".

2007 Feb 05
2
Two ways to deal with age in Cox model
...ere are two ways to deal with age, including age as a covariate, or to include age as part of the follow-up time, viz, Age as a covariate: tetest1 <- list(time= c(4, 3,1,1,2,2,3), status=c(1,NA,1,0,1,1,0), age= c(0, 2,1,1,1,0,0), riskfactor= c(0, 0,0,0,1,1,1)) fitagecovariate<-coxph( Surv(time, status) ~ age +riskfactor, test1) fitagecovariate Age included as part of follow-up time: test2<-test1 test2$timeplusage<-test2$time+test2$age fitagefollowup<-coxph( Surv(timeplusage, status) ~ riskfactor, test2) fitagefo...
2006 Dec 05
4
has_many with :uniq not working for me
Hi all, I have a relationship (no really!) class RiskMatrix < ActiveRecord::Base has_many :severities, :order => :position, :uniq => true end class RiskFactor < ActiveRecord::Base belongs_to :risk_matrix validates_presence_of :descriptor, :example validates_uniqueness_of :descriptor, :example, :scope=> :risk_matrix_id end class Severity < RiskFactor acts_as_list :scope => :risk_matrix end I don''t want any duplicates...
2008 Jun 09
2
Probs with paste
Hello all, After some months doing ok with R, I am embarrassed that I have to make this my first posting to the help list. I am trying to run the following (actually in a loop but shortened for the post): risk.factors <- c("file$A", "file$B", "file$C", "file$D", "file$E") table(paste(risk.factors[1])) but run into problems