similar to: Using method = "aic" with pspline & survreg (survival library)

Displaying 20 results from an estimated 700 matches similar to: "Using method = "aic" with pspline & survreg (survival library)"

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],
2012 Jul 26
0
Using pspline in bic.surv of BMA package
Hi, I'm trying to using pspline in bic.surv{BMA}. ############################# library(BMA) library(survival) data(veteran) test.bic.surv<- bic.surv(Surv(time,status) ~ karno+pspline(age,df=3)+diagtime+prior, data = veteran, factor.type = TRUE) summary(test.bic.surv, conditional=FALSE, digits=2) ############################# The results are:
2010 Apr 19
0
Natural cubic splines produced by smooth.Pspline and predict function in the package "pspline"
Hello, I am using R and the smooth.Pspline function in the pspline package to smooth some data by using natural cubic splines. After fitting a sufficiently smooth spline using the following call: (ps=smooth.Pspline(x,y,norder=2,spar=0.8,method=1) [the values of x are age in years from 1 to 100] I tried to check that R in fact had fitted a natural cubic spline by checking that the resulting
2013 Feb 28
2
predict.smooth.Pspline function not found
I have a simple question that irritatingly I haven't been able to figure out on my own. It seems that some functions from the "Pspline" package are successfully installed while others are not. The code with which I'm working is more complicated, but the following highlights my problem. If I run the following code > tt <- seq (0,1,length=20) > xt <- tt^3 > fit
2003 Apr 01
2
predict in Pspline package (PR#2714)
To whom it may concern, I don't know whether this is really a bug with the Pspline package or only a problem with my installation. Things work fine in Linux but not in Mac OS X (Darwin). Both system run the latest public versions of R and Pspline. predict.smooth.Pspline produces only NaN instead of predicted values when norder>2: > library (Pspline) > tt <- seq
2002 Nov 25
2
Pspline smoothing
Dear all, I'm trying to use the Pspline add-on package to fit a quintic spline (norder =3), but I keep running into a Singularity error. > traj.spl <- smooth.Pspline(time, x, norder=3 ) Error in smooth.Pspline(time, x, norder = 3) : Singularity error in solving equations > Playing around with the other parameters produces an "unused arguments" error: > traj.spl
2003 Jan 22
1
something wrong when using pspline in clogit?
Dear R users: I am not entirely convinced that clogit gives me the correct result when I use pspline() and maybe you could help correct me here. When I add a constant to my covariate I expect only the intercept to change, but not the coefficients. This is true (in clogit) when I assume a linear in the logit model, but the same does not happen when I use pspline(). If I did something similar
2008 May 09
1
predicting from coxph with pspline
Hello. I get a bit confused by the output from the predict function when used on an object from coxph in combination with p-spline, e.g. fit <- coxph(Surv(time1, time2, status)~pspline(x), Data) predict(fit, newdata=data.frame(x=1:2)) It seems like the output is somewhat independent of the x-values to predict at. For example x=1:2 gives the same result as x=21:22. Does the result span the
2011 May 29
1
Fitting spline using Pspline
Hey all, I seem to be having trouble fitting a spline to a large set of data using PSpline. It seems to work fine for a data set of size n=4476, but not for anything larger (say, n=4477). For example: THIS WORKS: ----------------------------- random = array(0,c(4476,2)) random[,1] = runif(4476,0,1) random[,2] = runif(4476,0,1) random = random[order(random[,1]),] plot(random[,1],random[,2])
2011 Sep 23
0
Using method = "aic" with pspline & survreg
--- begin inclusion -- Hi everybody. I'm trying to fit a weibull survival model with a spline basis for the predictor, using the survival library. I've noticed that it doesn't seem to be possible to use the aic method to choose the degrees of freedom for the spline basis in a parametric regression (although it's fine with the cox model, or if the degrees of freedom are specified
2010 Nov 17
1
where are my pspline knots?
Hi All, I am trying to figure out how to get the position of the knots in a pspline used in a cox model. my.model = coxph(Surv(agein, ageout, status) ~ pspline(x), mydata) # x being continuous How do I find out where the knot of the spline are? I would like to know to figure out how many cases are there between each knot. Best, Federico -- Federico C. F. Calboli Department of Epidemiology
2012 Oct 19
1
Addition of plot=F argument to termplot
I have a suggested addition to termplot. We have a local mod that is used whenever none of the termplot options is quite right. It is used here almost daily for Cox models in order to put the y axis on a risk scale: ---- fit <- coxph(Surv(time, status) ~ ph.ecog + pspline(age), data=lung) zz <- termplot(fit, se=TRUE, plot=FALSE) yy <- zz$age$y + outer(zz$age$se, c(0, -2, 2),
2006 May 16
1
survival package - pspline
help Hello, I?m a statistic student in Austria and I have to do a survival analysis in R by using psplines as regressor. My problem is that I sometimes (I think it depends on the choose of the parameters) get a error message, but I do not know what it means. After that I tried the procedure with an example dataset R is providing. Although using the cancer dataset I also get this message. Input:
2009 Nov 13
2
survreg function in survival package
Hi, Is it normal to get intercept in the list of covariates in the output of survreg function with standard error, z, p.value etc? Does it mean that intercept was fitted with the covariates? Does Value column represent coefficients or some thing else? Regards, ------------------------------------------------- tmp = survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian,
2003 Feb 27
2
interval-censored data in survreg()
I am trying to fit a lognormal distribution on interval-censored data. Some of my intervals have a lower bound of zero. Unfortunately, it seems like survreg() cannot deal with lower bounds of zero, despite the fact that plnorm(0)==0 and pnorm(-Inf)==0 are well defined. Below is a short example to reproduce the problem. Does anyone know why survreg() must behave that way? Is there an alternate
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.
2003 Oct 23
2
OOP like handling of lists?
Hello, I am writing a package with a collection of several models. In order to allow users to play interactively with the models (in contrast to hacking lengthy scripts), I want to put all what is needed to run a particular model into a single list object for each model. Then there will be a collection of functions to run the model or to modify parameters, time steps, integration method ...,
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
2009 Aug 01
2
Cox ridge regression
Hello, I have questions regarding penalized Cox regression using survival package (functions coxph() and ridge()). I am using R 2.8.0 on Ubuntu Linux and survival package version 2.35-4. Question 1. Consider the following example from help(ridge): > fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), ovarian) As I understand, this builds a model in which `rx' is