similar to: Fitting spline using Pspline

Displaying 20 results from an estimated 300 matches similar to: "Fitting spline using Pspline"

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 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
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
2001 Dec 05
4
Questions about piecewise spline fitting
Hi All, I want to fit a piecewise spline of degree 1, i.e. a spline consisting of a straight line over each piece. I downloaded the R package pspline, then I have following questions: 1. in the program, the degree of the spline is specified by 2*norder-1. Why do they adopt such scheme that we can only fit a spline with odd degree? 2. norder cannot be set to 1. Is there any specific reason
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
2001 Apr 17
1
Beginner question
I'm a Beginner on R-language and I' have tried to use some packages but the following message have appeared: "Error in .Fortran("pspline", as.integer(n), as.integer(nvar), as.integer(norder), : C/Fortran function name not in load table" I'm using a Windows version and I'd like to know if it is a installation problem or problems with paths? Thanks,
2004 Aug 13
1
How to use the whole dataset (including between events) in Cox model (time-varying covariates) ?
Hello, coxph does not use any information that are in the dataset between event times (or "death times") , since computation only occurs at event times. For instance, removing observations when there is no event at that time in the whole dataset does not change the results: > set.seed(1) > data <- as.data.frame(cbind(start=c(1:5,1:5,1:4),stop=c(2:6,2:6,2:5),status=c(rep(
2005 Oct 03
3
spline.des
Hello, I am using library fda and I can not run a lot of functions because I receive the error: Error in bsplineS(evalarg, breaks, norder, nderiv) : couldn't find function "spline.des" do you know how I can fix that? Thnaks. Liliana
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:
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
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],
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
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
2011 May 19
2
Problem with Princurve
Hey all, I can't seem to get the princurve package to produce correct results, even in the simplest cases. For example, if you just generate a 1 period noiseless sine wave, and ask for the principal curve and plot, the returned curve is clearly wrong (doesn't follow the sine wave). Here's my code: library(princurve) x <- runif(1000,0,2*pi); x <- cbind(x/(2*pi), sin(x)) fit1
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:
2011 Sep 20
0
Using method = "aic" with pspline & survreg (survival library)
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 directly by the user),
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
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)* > > > >
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 work out. Can any one help me with this? is there anyway to get the
2010 Nov 29
1
Evaluation of survival analysis
Dear all, May I ask is there any functions 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))