Displaying 20 results from an estimated 1000 matches similar to: "Pspline smoothing"
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
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])
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,
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 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],
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
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
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:
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(
2012 Jun 09
2
Help with permutation function from Turner et al. 2010 (Ecology)
Hello,
I'm using R code that includes a residual permutation that was written as a supplement to the paper:
Turner et al. 2010. A general hypothesis-testing framework for stable isotopes ratios in ecological studies. Ecology 91:2227-2233.
The supplemental code is available at: http://www.esapubs.org/archive/ecol/E091/157/suppl-1.htm
When I execute the function, no warnings are given
2009 Sep 09
1
Package that does not work until I re write the exactly the same code
Hi the list,
I am writing a package in S4 and I do not manage to understand a bug.
The "R CMD check" and the "R CMD build" both work. Here is links to the
package (not on CRAN yet for the raison that I explain bellow):
http://christophe.genolini.free.fr/aTelecharger/kml_0.5.zip
http://christophe.genolini.free.fr/aTelecharger/kml_0.5.tar.gz
Then I install the package and I
2014 Mar 19
1
Memcheck: Invalid read of size 4
Hi the list,
One of my package has a memory issue that I do not manage to understand. The Memtest notes is here:
<http://www.stats.ox.ac.uk/pub/bdr/memtests/valgrind/kml-Ex.Rout>
Here is the message that I get from Memtest
--- 8< ----------------
~ Fast KmL ~
==27283== Invalid read of size 4
==27283== at 0x10C5DF28: kml1 (kml.c:183)
...
==27283== by 0x10C5DE4F: kml1 (kml.c:151)
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:
2008 Feb 23
1
Set without argument
Hi the list,
I am defining S4 objet. Is it possbile to define a method that change
the slot of an object without using <- ?
My object contain a numeric and a matrix. At some point, I would like to
impute the missing value in the matrix. So I would like to use something
like :
-----------------
setClass("MyObj",representation(time="numeric",traj="matrix"))
a
2002 Aug 14
1
numerical differentiation
Hi,
I would like like to compute first and second derivative
from numerical data. I hoped I could compute a spline
object from the data (that works), and then compute the
derivative from that spline objects, but I couldn't find
anything like that.
Does somebody know how to get numerical derivatives?
Oliver
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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)*
>
>
>
>
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),