Displaying 20 results from an estimated 1200 matches similar to: "Restricted cubic spline function ERROR?: glm(Y~rcs(x,5))"
2008 Nov 06
0
Inference and confidence interval for a restricted cubic spline function in a hurdle model
Dear list,
I'm currently analyzing some count data using a hurdle model. I've used
the rcspline.eval function in the Hmisc-library to contruct the spline
terms for the regression model, and what I want in the end is the ability
to compute coefficients and confidence intervals for different changes in
the smooth function as well as plotting the smooth function along with the
2009 Sep 30
1
rcs fits in design package
Hi all,
I have a vector of proportions (post_op_prw) such that
>summary(amb$post_op_prw)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.0000 0.0000 0.0000 0.3985 0.9134 0.9962 1.0000
> summary(cut2(amb$post_op_prw,0.0001))
[0.0000,0.0001) [0.0001,0.9962] NA's
1904 1672 1
2008 Dec 01
1
explaining a model with rcs() terms
Hi, I am using the rcs() function in the Design library to model
non-linearity that is not well characterized by an otherwise
mechanistic function. I am able to make the model 'available' to
others through the excellent nomogram() function and the set of tables
that it can create. However, I would like to present the model in an
'expanded' format-- probably what rcspline.restate()
2012 Apr 29
1
RCS (Restriced Cubic Splines)
In the book, "Regression Modeling Strategies", Frank Harrell uses the function rcs() often.
The current version or R and Hmisc library don't appear to have this function.
What is an appropriate substitute?
Thank You
--
Noah Silverman
UCLA Department of Statistics
8208 Math Sciences Building
Los Angeles, CA 90095
[[alternative HTML version deleted]]
2011 Jun 11
3
rcspline.plot query
Dear all,
As I am new to the R community - although eager to advance- I would
like to pose a question to the community.
I have an SPSS file which I have imported it in R (with the read.spss
command) which conists of scale (continuous) variable "adiponectin" and
the corresponding categorical value "death" (0=No, 1=Yes). In all there
are 60 observations (among which
2018 Mar 23
1
restricted cubic spline in FGR function
Dear Thomas,
I want to use evaluate effect of Age using restricted cubic form in the FGR function as
Fgr.crr <- FGR(Hist(time, event) ~ rcs(Age_years), data=dat)
It provides error. " Error in parse(text = termtext, keep.source = FALSE): .... 1: response ~ rcs(Age_years
Do I need to change any of the R code?
Regards
Amalraj Raja
The University of Aberdeen is a charity
2011 Oct 11
1
restricted cubic spline within survfit.cph in the package rms
Hello,
does anyone have an example on how to use restricted cubic
splines function rcs within survfit.cph, if cph (Cox Proportional Hazard Regression) was done with restricted cubic
splines (which I made to work)?
Thank you.
>
[[alternative HTML version deleted]]
2011 May 06
2
rcspline.problem
Dear Dr ;
I am a PhD student at Epidemiology department of National University of
Singapore. I used R command (rcspline.plot) for plotting restricted cubic
spline ??? the model is based on Cox. I managed to get a plot without
adjustment for other covariates, but I have a problem regarding to
adjusting the confounders.
I applied below command to generate the matrix for
2005 Aug 13
1
Penalized likelihood-ratio chi-squared statistic: L.R. model for Goodness of fit?
Dear R list,
From the lrm() binary logistic model we derived the G2 value or the
likelihood-ratio chi-squared statistic given as L.R. model, in the output of
the lrm().
How can this value be penalized for non-linearity (we used splines in the
lrm function)?
lrm.iRVI <- lrm(arson ~ rcs(iRVI,5),
penalty=list(simple=10,nonlinear=100,nonlinear.interaction=4))
This didn’t work
2010 Oct 13
1
Building rpm package for Hmisc on Fedora 12
Hi, I'm trying to get the 'xts' library from CRAN packaged for Fedora 12, and
one of its dependencies is 'Hmisc'. I have created a spec file for that using
R2spec, but building it fails with something in building the manual pages:
Warning: ./man/escapeRegex.Rd:22: unknown macro '\backslash'
[similar warnings snipped]
Warning: newline within quoted string at
2005 Aug 22
1
How to add values on the axes of the 3D bi-variable lrm fit?
Dear r-list,
When I try to plot the following 3D lrm fit I obtain only arrows with labels
on the three axes of the figure (without values).
fit <- lrm(y ~ rcs(x1,knots)+rcs(x2,knots), tol=1e-14,X=T,Y=T)
dd <- datadist(x1,x2);options(datadist='dd');
par(mfrow=c(1,1))
plot(fit,x1=NA, x2=NA, theta=50,phi=25)
How can I add values to the axes of this plot? (axes with the
2005 Apr 15
2
negetative AIC values: How to compare models with negative AIC's
Dear,
When fitting the following model
knots <- 5
lrm.NDWI <- lrm(m.arson ~ rcs(NDWI,knots)
I obtain the following result:
Logistic Regression Model
lrm(formula = m.arson ~ rcs(NDWI, knots))
Frequencies of Responses
0 1
666 35
Obs Max Deriv Model L.R. d.f. P C Dxy
Gamma Tau-a R2 Brier
701 5e-07 34.49
2010 Nov 25
1
How to change value of y axis from log relative Hazard to relative Hazard
http://r.789695.n4.nabble.com/file/n3058505/file.csv file.csv
Hi, Rusers
I have a problem in making a rcspline.plot with a Hmisc package.
My data is in the upload attachment.
My programme as follows:
library(Hmisc)
A<-read.csv("file.csv",header=TRUE)
attach(A)
2005 Apr 15
1
Range in probabilities of a fitted lrm model (Y~X)
Dear R-list,
Is there a function or technique by which the probability (or log odds)
range of a logistic model (fit <- lrm(Y~X)) can be derived?
The aim is to obtain min & max of the estimated probabilities of Y.
Could summary.Design() be used for that or is there another method/trick?
Thanks,
Jan
_______________________________________________________________________
ir. Jan
2003 May 08
2
natural splines
Apologies if this is this too obscure for R-help.
In package splines, ns(x,,knots,intercept=TRUE) produces an n by K+2
matrix N, the values of K+2 basis functions for the natural splines with K
(internal) knots, evaluated at x. It does this by first generating an
n by K+4 matrix B of unconstrained splines, then postmultiplying B by
H, a K+4 by K+2 representation of the nullspace of C (2 by K+4),
2005 Feb 22
2
ERROR NaNs produced; when comparing two logistic regression models with the ANOVA CHI test
Dear R-list,
*When comparing two logistic regression models with the anova CHi test, I
obtain the following error: (there are no NA's in the time series). How can
this be solved such that I can compare two models on the same dataset were
different explanatory variables are used?
l.KBDI <- glm(zna.arson2 ~ zna.KBDI,family = binomial)
l.NDWI <- glm(zna.arson2 ~ zna.NDWI,family
2011 Oct 12
1
Cross posting (was "Restricted Cubic Splines within survfit.cph)
You wrote:
"It may be best to either write to the package maintainer (me, as you
did) or post to the group but not both."
This is just a note that I disagree wrt my own packages:
I go on vacation or trips, or have other projects so won't always
answer
Other folks on the list often have good ideas that I'd miss
My preferred standard is "ask the list, with a copy
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi,
When running
z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image')
Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)),
zlab='Probability')
And after pointing the cursor to the plot() screen in R, I obtain the
following message:
Using function "locator(2)" to place opposite corners of image.legend
Error in
2010 Sep 26
1
Basis functions of cubic regression spline in mgcv
I have a question about the basis functions of cubic regression spline in
mgcv. Are there some ways I can get the exact forms of the basis functions
and the penalty matrix that are used in mgcv? Thanks in advance!
Yan
[[alternative HTML version deleted]]
2011 Oct 27
1
Fitting Maximums of data series with cubic spline
Hi Users,
I want to fit the maximums of a data series with a cubic spline. How do I
go about this in R.
I failed to figure out how I can use the mgcv library to do this.
Thanks
----------------------------
ZABLONE