similar to: Addition of plot=F argument to termplot

Displaying 20 results from an estimated 7000 matches similar to: "Addition of plot=F argument to termplot"

2008 Nov 25
1
how to check linearity in Cox regression
On examining non-linearity of Cox coefficients with penalized splines - I have not been able to dig up a completely clear description of the test performed in R or S-plus. >From the Therneau and Grambsch book (2000 - page 126) I gather that the test reported for "linear" has as its null hypothesis that the spline coefficient is the same at the center of basis. Thus, in the example
2011 Apr 06
1
help on pspline in coxph
Hi there, I have a question on how to extract the linear term in the penalized spline in coxph. Here is a sample code: n=100 set.seed(1) x=runif(100) f1 = cos(2*pi*x) hazard = exp(f1) T = 0 for (i in 1:100) { T[i] = rexp(1,hazard[i]) } C = runif(n)*4 cen = T<=C y = T*(cen) + C*(1-cen) data.tr=cbind(y,cen,x) fit=coxph(Surv(data.tr[,1],
2013 Feb 18
0
Small suggestion for termplot
Brian, I used termplot(..., plot=FALSE) recently in R-devel: works like a charm. Thanks much for the update. Our in-house "gamterms" function, which this obviates, would also return the "constant" attribute from the underlying predict(..., type="terms") call. I have occasionally found this useful, and so it would be a worthwhile addition to termplot.
2010 Feb 16
1
survival - ratio likelihood for ridge coxph()
It seems to me that R returns the unpenalized log-likelihood for the ratio likelihood test when ridge regression Cox proportional model is implemented. Is this as expected? In the example below, if I am not mistaken, fit$loglik[2] is unpenalized log-likelihood for the final estimates of coefficients. I would expect to get the penalized log-likelihood. I would like to check if this is as expected.
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 =
2018 Jan 15
1
Time-dependent coefficients in a Cox model with categorical variants
Suppose I have a dataset contain three variants, looks like > head(dta) Sex tumorsize Histology time status 0 1.5 2 12.1000 0 1 1.8 1 38.4000 0 ..................... Sex: 1 for male; 0 for female., two levels Histology: 1 for SqCC; 2 for High risk AC; 3 for low risk AC,
2008 May 09
2
how to check linearity in Cox regression
Hi, I am just wondering if there is a test available for testing if a linear fit of an independent variable in a Cox regression is enough? Thanks for any suggestions. John Zhang ____________________________________________________________________________________ [[elided Yahoo spam]]
2008 Apr 21
2
Trend test for survival data
Hello, is there a R package that provides a log rank trend test for survival data in >=3 treatment groups? Or are there any comparable trend tests for survival data in R? Thanks a lot Markus -- Dipl. Inf. Markus Kreuz Universitaet Leipzig Institut fuer medizinische Informatik, Statistik und Epidemiologie (IMISE) Haertelstr. 16-18 D-04107 Leipzig Tel. +49 341 97 16 276 Fax. +49 341 97 16
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi, I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this: library(survival) data(lung) lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung) # lung.byPS Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung) 1
2004 Apr 09
2
Regression models w/ splines
Hi - I am fitting various Cox PH models with spline predictors. After fitting the model, I would like to use termplot() to examine the functional form of the fitted model (e.g., to obtain a plot of the relative risk (or log r.r.) versus the predictors). When there is only 1 predictor in the model, termplot returns a "?". In this case, I have not been able to figure out how to create
2004 Mar 18
1
termplot has problems with a single term (fix included) (PR#6679)
On Thu, 18 Mar 2004 k.hansen@biostat.ku.dk wrote: > The bug exists on R-1.9.0-alpha compiled the 10/3. > > Termplot has a problem if either the model only contains a single term > or if asked to plot a single term. In addition there are problems with > the option se = TRUE. I can't reproduce this in either R-devel or 1.8.1, and termplot hasn't changed since January. I do
2000 Oct 27
1
par(ask=T) in termplot() (PR#711)
At 11:57 25/10/00 +0100, Brian Ripley wrote: >> Date: mer., 25 oct. 2000 12:38:55 +0200 >> From: Emmanuel Paradis <paradis@isem.univ-montp2.fr> > >> I think it would be nice to have par(ask=T) set by default in termplot(), >> like it is in plot.lm(). > >Well, it isn't really the default in plot.lm, the default for `ask' being > >interactive()
2004 Jan 22
1
Bug in termplot?
Hi, Is this a bug in termplot, or (once again) do I just not understand what R is really doing? I am using termplot to contruct partial residual plots, 1. For all terms at once 2. One term at a time but I get different results from these two methods. To give a concrete example, I would have thought the top and bottom rows of the plot constructed with the following code would be identical.
2018 Jan 11
0
termplot intervals - SE or CI?
From ?termplot: col.se, lty.se, lwd.se: color, line type and line width for the ?twice-standard-error curve? when ?se = TRUE?. ...which is findable, but might usefully also be made explicit in the definition of the se= argument. -pd > On 10 Jan 2018, at 23:27 , Eric Goodwin <Eric.Goodwin at cawthron.org.nz> wrote: > > Thanks for your prompt reply Duncan. > >
2018 Jan 10
1
termplot intervals - SE or CI?
Thanks for your prompt reply Duncan. I had indeed assumed they were what the help file says until observation raised doubts, which is why I queried it. >From reading the code for termplot(), it seems that either the predict() function doesn't return the 1x standard error, or the curves plotted by the termplot() function are not 1x standard errors. If they're not 1x standard errors,
2010 Aug 26
3
Using termplot() with transformations of x
Hi all I was playing with termplot(), and came across what appears to be an inconsistency. It would appreciate if someone could enlighten me: > # First, generate some data: > y <- rnorm(100) > x <- runif(length(y),1,2) > # Now find the log of x: > logx <- log(x) > > # Now fit two models that are exactly the same, but specified differently: > m1 <-
2011 Dec 14
1
termplot & predict.lm. some details about calculating predicted values with "other variables set at the mean"
I'm making some functions to illustrate regressions and I have been staring at termplot and predict.lm and residuals.lm to see how this is done. I've wondered who wrote predict.lm originally, because I think it is very clever. I got interested because termplot doesn't work with interactive models: > m1 <- lm(y ~ x1*x2) > termplot(m1) Error in `[.data.frame`(mf, , i) :
2006 Jul 15
1
termplot and ylim
Hi together, I always get an error message with using ylim in termplot(), like this: > x<-(1:10) > y<-(10:1) > l<-lm(y~x) > termplot(l,ylim=c(1,2)) Is this a bug, or is there another possibility to do that? Especially, I would like to use term.plot() for gamlss objects. Thanks for your help! Andreas -- Echte DSL-Flatrate dauerhaft f?r 0,- Euro*!
2009 Jan 19
1
termplot
I have used glm and stepAIC to choose a best model. I can use termplot to assess the contribution of each explanatory variable in the glm. However the final model after running stepAIC includes interaction terms, and when I do termplot I get "Error in `[.data.frame`(mf, , i) : undefined columns selected". I also see the termplot detail saying "Nothing sensible happens for
2012 Jun 05
1
model.frame and predvars
I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm does not. I use a call to model.frame in predict.coxph, which is why I went that route, but never noted the difference till now (preparing for my course in Nashville). Could someone shed light