search for: pspline

Displaying 20 results from an estimated 72 matches for "pspline".

Did you mean: spline
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 <- smooth.Pspline (tt, xt, norder=3,spar=0...
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 <- se...
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 a...
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) #############################...
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 to...
2017 Nov 01
3
Cox Regression : Spline Coefficient Interpretation?
Hi, I'm using a Cox-Regression to estimate hazard rates on prepayments. I'm using the "pspline" function to face non-linearity, but I have no clue how to interpret the result. Unfortunately I did not find enough information on the "pspline" function wether in the survival package nor using google.. I got following output: * library(survival)* > > > > > >...
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...
2017 Nov 02
0
Cox Regression : Spline Coefficient Interpretation?
...ng and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Nov 2, 2017 at 3:43 AM, Kosta S. <kosmirnov at gmail.com> wrote: > Hi Bert, > > Maybe I should make this more clear. > I get following output when I use the pspline function inside the coxph > statement: > > * library(survival)* > > >> >> >> >> >> >> >> >> >> >> >> >> >> *> Option.test2<-coxph(Surv(START,STOP,ZEROBAL==1)~pspline(OPTION), >> data=FNMA)coxph(...
2011 Apr 06
1
help on pspline in coxph
...re 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], data.tr[,2])~pspline(data.tr[,3]) ) If I use summary(fit), it will show the following results: summary(fit) Call: coxph(formula = Surv(data.tr[, 1], data.tr[, 2]) ~ pspline(data.tr[, 3])) n= 100 coef se(coef) se2 Chisq DF p pspline(data.tr[, 3]), li 0.495 0.437 0.437 1.28...
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: survre...
2008 Apr 23
2
help on coxph.wtest
Hi, i need to use pspline. In this pspline function coxph.wtest was used. When I try to make some change to this function by pulling out the pspline function, it turns out R gave me an error msg, saying coxph.wtest cannot be found. Even if i dont change anything in pspline and just rename it and run the function, it did not...
2010 Nov 29
1
Evaluation of survival analysis
...in R to evaluate the fitness of "coxph" and "survreg" in survival analysis, please? For example, the results from Cox regression and Parametric survival analysis are shown below. Which method is prefered and how to see that / how to compare the methods? 1. coxph(formula = y ~ pspline(x1, df = 2)) coef se(coef) se2 Chisq DF p pspline(x1, df = 2), line 0.0522 0.00867 0.00866 36.23 1.00 1.8e-09 pspline(x1, df = 2), nonl 3.27 1.04 7.5e-02 Iterations: 4 outer, 13 Newton-Raphson Theta= 0....
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...
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...
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 x-values in the original data set so that if I want to predict a value at x=25, than x=c(mi...
2011 Sep 20
0
Using method = "aic" with pspline & survreg (survival library)
...ine with the cox model, or if the degrees of freedom are specified directly by the user), and I was wondering if there is some reason for this? Simple example: library(survival) attach(cancer) # cox model with specified degs of freedom - works fine fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,3), cancer) # cox model with aic - works fine fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,method="aic"), cancer) # weibull model with specified degs of freedom - works fine fit1 <- survreg(Surv(time, status) ~ ph.ecog + pspline(age,3), cancer, dist="weibull&quo...
2008 Nov 25
1
how to check linearity in Cox regression
...sis. Thus, in the example quoted below (from the thread) one might say treating age as linear is not too bad, to the extent that failure to reject a null can be so interpreted. Is that right? And what is the null for the nonlinear test? --Michael Margolis ..............QUOTE.............. Use pspline within a Cox model. It includes a fairly general test for nonlinearity, that is similar to GAM models. Terry Therneau > coxph(Surv(time, status) ~ ph.ecog + pspline(age), lung) Call: coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age), data = lung) coef...
2004 Mar 19
0
osx/fink: cannot do "R INSTALL" (library mixup)
...anybody know how I can solve this problem, e.g. how to alter the -L(directory) commands that are employed? (Aside: I looked for a solution on the R archives. Also, I've tried to make my subject-line clear enough that an answer will benefit other osx/fink users. Thanks!!) $ R INSTALL pspline * Installing *source* package 'pspline' ... ** libs gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o pspline.so Pspline.o -L/usr/local/lib -L/usr/local/lib/gcc/powerpc- apple-darwin6.6/3.4 -L/usr/local/lib/gcc/powerpc-apple-darwin6.6/3.4/../../.. -lfrtbegin -lg2c...
2004 Mar 19
0
Fwd: osx/fink: cannot do "R INSTALL" (library mixup)
...ate: March 19, 2004 12:00:01 PM AST > To: Don MacQueen <macq at llnl.gov> > Subject: Re: [R] osx/fink: cannot do "R INSTALL" (library mixup) > > That works perfectly! THanks. I did > 524 export PKG_LIBS="-L/usr/local/lib -L/sw/lib" > 525 R INSTALL pspline > and all is fine. Cheers! > > > On Mar 19, 2004, at 11:51 AM, Don MacQueen wrote: > >> Did you install the so-called "Developer Tools"? Or perhaps it's more >> correctly called "XTools" in 10.3 (Panther). >> >> You may have learned a...
1998 Aug 31
0
Packages aov, modreg, lqs, psplines
...ers, it is very hard to establish the true answer. I am fairly convinced that both S-PLUS versions are slightly wrong.) I plan to add S-estimation, a general M-estimator (based on my function rlm) and MM-estimation to this over the next few weeks. While I am posting, a R port of Jim Ramsay's psplines package is also there en route to CRAN, file (pspline_1.0-1.tar.gz) as well as an update of the V&R `R' Complements to 0.62.3. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford,...