similar to: Survival dummy variables and some questions

Displaying 20 results from an estimated 500 matches similar to: "Survival dummy variables and some questions"

2005 Oct 27
2
how to predict with logistic model in package logistf ?
dear community, I am a beginer in R , and can't predict with logistic model in package logistf, could anyone help me ? thanks ! the following is my command and result : >library(logistf) >data(sex2) >fit<-logistf(case ~ age+oc+vic+vicl+vis+dia, data=sex2) >predict(fit,newdata=sex2) Error in predict(fit, newdata = sex2) : no applicable method for "predict"
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2003 Dec 17
5
beginner programming question
Hi all, The last e-mails about beginners gave me the courage to post a question; from a beginner's perspective, there are a lot of questions that I'm tempted to ask. But I'm trying to find the answers either in the documentation, either in the about 15 free books I have, either in the help archives (I often found many similar questions posted in the past). Being an (still actual)
2018 May 08
0
Fitting problem for Cox model with Strata as interaction term
Dear All, I got a warning message "X matrix deemed to be singular" in Cox model with a time dependent coefficient. In my analysis, the variable "SEX" is a categorical variable which violate the PH assumption in Cox. I first used the survSplit() function to break the data set into different time intervals, and then fit the model. The procedures can be described as follows:
2009 Oct 11
3
Error in family$family : $ operator is invalid for atomic vectors
Dear List, I'm having problem with an exercise from The R book (M.J. Crawley) on page 567. Here is the entire code upto the point where I get an error. data(UCBAdmissions) x <- aperm(UCBAdmissions, c(2, 1, 3)) names(dimnames(x)) <- c("Sex", "Admit?", "Department") ftable(x) fourfoldplot(x, margin = 2) dept<-gl(6,4) sex<-gl(2,1,24)
2004 Oct 07
3
Remove Indeterminate Level
Hi, I have imported some data to R from stata and my factor variables have an Indeterminate level which I don't really want. For example the variable sex has the levels Male, Female and Indeterminate. There are no 'Indeterminate' values in the data. Can somebody tell me how to get rid of this level as it restricting my cox ph model. Thanks Neil
2011 May 05
0
Conditional distribution plot using Model-based Recursive Partitioning
Hello, I am using the party module to estimate the relationship between the probability of being a student and number of siblings (alive). However, I need to include a number of relevant covariates. My code is below: fm3 <- mob(Student ~ age + alive + sex2 + cwa + cha + cym | Religion+Servant + Literacy, control = ctrl, data = samp2, model = glinearModel, family =binomial()) plot(fm3, tp_args
2013 Jan 06
4
random effects model
Hi A.K Regarding my question on comparing normal/ obese/overweight with blood pressure change, I did finally as per the first suggestion of stacking the data and creating a normal category . This only gives me a obese not obese 14, but when I did with the wide format hoping to get a obese14,normal14,overweight 14 Vs hibp 21, i could not complete any of the models. This time I classified obese=1
2008 Oct 15
1
Parameter estimates from an ANCOVA
Hi all, This is probably going to come off as unnecessary (and show my ignorance) but I am trying to understand the parameter estimates I am getting from R when doing an ANCOVA. Basically, I am accustomed to the estimate for the categorical variable being equivalent to the respective cell means minus the grand mean. I know is the case in JMP - all other estimates from these data match the
2009 Jun 11
2
How to order an data.table by values of an column?
Hello! Can you help me? How to order an data.table by values of an column? Per example: Table no initial Categ Perc 468  31.52 351  27.52 0  0.77 234  22.55 117  15.99 table final Categ Perc 0  0.77 117  15.99 234  22.55 351  27.52 468  31.52 Lesandro Veja quais são os assuntos do momento no Yahoo! +Buscados [[alternative HTML version deleted]]
2007 May 18
4
Simple programming question
Hi R-users, I have a simple question for R heavy users. If I have a data frame like this dfr <- data.frame(id=1:16, categ=rep(LETTERS[1:4], 4), var3=c(8,7,6,6,5,4,5,4,3,4,3,2,3,2,1,1)) dfr <- dfr[order(dfr$categ),] and I want to score values or points in variable named "var3" following this kind of logic: 1. the highest value of var3 within category (variable named
2020 Jan 01
2
New R function is.nana = is.na & !is.nan
Hello R-devel, Best wishes in the new year. I am writing to kindly request new R function so NA_real_ can be more easily detected. Currently if one wants to test for NA_real_ (but not NaN) then extra work has to be done: `is.na(x) & !is.nan(x)` Required functionality is already at C level so to address my request there is not that much to do. Kevin Ushey made a nice summary of current R C api
2020 Jan 02
1
New R function is.nana = is.na & !is.nan
"nana" is meant to express "NA, really NA". Your suggestion sounds good. On Thu 2 Jan, 2020, 3:38 AM Pages, Herve, <hpages at fredhutch.org> wrote: > Happy New Year everybody! > > The name (is.nana) doesn't make much sense to me. Can you explain it? > > One alternative would be to add an extra argument (e.g. 'strict') to > is.na(). FALSE by
2020 Jan 01
0
New R function is.nana = is.na & !is.nan
Happy New Year everybody! The name (is.nana) doesn't make much sense to me. Can you explain it? One alternative would be to add an extra argument (e.g. 'strict') to is.na(). FALSE by default, and ignored (with or w/o a warning) when the type of 'x' is not "numeric". H. On 12/31/19 22:16, Jan Gorecki wrote: > Hello R-devel, > > Best wishes in the new
2002 May 16
1
glm(y ~ -1 + c, "binomial") question
This is a question about removing the intercept in a binomial glm() model with categorical predictors. V&R (3rd Ed. Ch7) and Chambers & Hastie (1993) were very helpful but I wasn't sure I got all the answers. In a simplistic example suppose I want to explore how disability (3 levels, profound, severe, and mild) affects the dichotomized outcome. The glm1 model (see below) is
2010 Nov 24
2
Is there an equivalent to predict(..., type="linear") of a Proportional hazard model for a Cox model instead?
Hi all, Is there an equivalent to predict(...,type="linear") of a Proportional hazard model for a Cox model instead? For example, the Figure 13.12 in MASS (p384) is produced by: (aids.ps <- survreg(Surv(survtime + 0.9, status) ~ state + T.categ + pspline(age, df=6), data = Aidsp)) zz <- predict(aids.ps, data.frame(state = factor(rep("NSW", 83), levels =
2005 Nov 24
4
Survreg Weibull lambda and p
Hi All, I have conducted the following survival analysis which appears to be OK (thanks BRipley for solving my earlier problem). > surv.mod1 <- survreg( Surv(timep1, relall6)~randgrpc, data=Dataset, dist="weibull", scale = 1) > summary(surv.mod1) Call: survreg(formula = Surv(timep1, relall6) ~ randgrpc, data = Dataset, dist = "weibull", scale = 1)
2011 Jun 23
2
Rms package - problems with fit.mult.impute
Hi! Does anyone know how to do the test for goodness of fit of a logistic model (in rms package) after running fit.mult.impute? I am using the rms and Hmisc packages to do a multiple imputation followed by a logistic regression model using lrm. Everything works fine until I try to run the test for goodness of fit: residuals(type=c("gof")) One needs to specify y=T and x=T in the fit. But
2013 Aug 29
4
Add new calculated column to data frame
Hi, I have a following data set: id event time (in sec) 1 add 1373502892 2 add 1373502972 3 delete 1373502995 4 view 1373503896 5 add 1373503996 ... I'd like to add new column "time on task" which is time elapsed between two events (id2 - id1...). What would be the best approach to do that? Thanks, Srecko [[alternative HTML
2009 Oct 29
3
Removing & generating data by category
Dear R users, Basically, from the following arbitrary data set: a <- data.frame(id=c(c("A1","A2","A3","A4","A5"),c("A3","A2","A3","A4","A5")),loc=c("B1","B2","B3","B4","B5"),clm=c(rep(("General"),6),rep("Life",4))) > a