search for: rcspline

Displaying 17 results from an estimated 17 matches for "rcspline".

Did you mean: pspline
2011 Jun 11
3
rcspline.plot query
...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 there are 26 events). I am trying to do rcspline.plot (model="logisitc", nk=5, knots=NULL) however the error message that i get is "fewer than 6 non missing observations". I have repeated the process with a similar dataset of 300 observations (instead of 60) and I still get the same message. Can anybody suggest a hin...
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 covariates. m=as.matrix(...
2010 Oct 13
1
Building rpm package for Hmisc on Fedora 12
...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 rcspline.restate.Rd:21 Warning: ./man/rcspline.restate.Rd:80: unexpected section header '\value' Warning: newline within quoted string at rcspline.restate.Rd:21 Warning: ./man/rcspline.restate.Rd:115: unknown macro '\n' Warning: newline within quoted string at rcspline.restate.Rd:21 Error in...
2009 Sep 30
1
rcs fits in design package
....9962] NA's 1904 1672 1 I want to use post_op_prw as a predictor variable in an OLS model. I decided to fit it using a restricted cubic spline. But, I'm seeing behavior I don't understand. See below: > rcspline.eval(amb$post_op_prw,nk = 3, knots.only = T) [1] 0.0000000 0.6147927 0.9092937 0.9667178 Warning message: In rcspline.eval(amb$post_op_prw, nk = 3, knots.only = T) : could not obtain 3 knots with default algorithm. Used alternate algorithm to obtain 4 knots > rcspline.eval(amb$post_op_p...
2007 Mar 04
0
Trouble figuring messages from rcspline.plot
I have an attached data.frame with a binary composite variable (comp) and a predictor (egfr). I am trying to plot a restricted cubic spline using: require (Hmisc) require (Design) rcspline.plot(x=egfr,y=comp,model="logistic",nk=5,knots=NULL, xlab="label1", ylab="Label2", plim=c(0,1), plotcl=TRUE, showknots=TRUE, add=FALSE, lty=1, noprint=FALSE, smooth=FALSE, main="Title goes here ");...
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) rcspline.plot(factor,Time,model="cox",xrange=c(0,3),ylim=c(-1,2),event=event,nk=4,knots=c(0.8,1.0,1.5,2.0),showknots=...
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 confidence int...
2005 May 02
2
Restricted cubic spline function ERROR?: glm(Y~rcs(x,5))
Dear all, Is the restricted cubic spline function working properly in the glm model? We used glm(y~rcs(x,5), family=binomial) but it seems that for some theoretical reasons the rcs, restricted cubic spline function can not be fitted by a glm function. Is this correct? Regards, Jan ((Originally, we used lrm(y~ rcs(x,5)) but we couldn't find how to derive the AIC value of the fitted model.
2003 Apr 24
1
"Missing links": Hmisc and Design docs
...text html latex example missing link(s): trellis plsmo text html latex example missing link(s): trellis ps.slide text html latex example missing link(s): win.slide fig mgp.axis.labels pdf.graph rcspline.eval text html latex example missing link(s): Design.trans rcspline.plot text html latex example missing link(s): lrm cph lrm.fit rcspline.restate text html latex example missing link(s): Design.t...
2004 Nov 30
2
impute missing values in correlated variables: transcan?
...cale." But I can't get it to work. I say m1 <- matrix(1:20+rnorm(20),5,) # four correlated variables colnames(m1) <- paste("R",1:4,sep="") m1[c(2,19)] <- NA # simulate some missing data library(Hmisc) transcan(m1,data=m1) and I get Error in rcspline.eval(y, nk = nk, inclx = TRUE) : fewer than 6 non-missing observations with knots omitted I've tried a few other things, but I think it is time to ask for help. The specific problem is a real one. Our graduate admissions committee (4 members) rates applications, and we average the rat...
2008 Dec 01
1
explaining a model with rcs() terms
...at 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() or latex.Design() produce on a model fit object. Here is how the model was fit: fit.ols <- ols( log(k) ~ (rcs(activity) * (log(conc) + sar)) + (rcs(sand) * (log(conc) + sar)), data=sm.clean, x=TRUE, y=TRUE) Here is how I am accessing the 'expanded' format of the model struct...
2012 Apr 19
2
Gls function in rms package
Dear R-help, I don't understand why Gls gives me an error when trying to fit a model with AR(2) errors, while gls (from nlme) does not. For example: library(nlme) library(rms) set.seed(1) d <- data.frame(x = rnorm(50), y = rnorm(50)) gls(y ~ x, data=d, correlation = corARMA(p=2)) #This works Gls(y ~ x, data=d, correlation = corARMA(p=2)) # Gives error # Error in
2008 Nov 03
0
NaN causes "error in fitter" with cph.calibrate from pkg Design
...; "" ... .. ..- attr(*, "names")= chr [1:8] "Age" "Sex" "BL_HDL.A" "BL_CHOLEST.A" ... ..$ colnames : chr [1:16] "Age" "Age'" "Sex=Male" "BL_HDL.A" ... ..$ assume : chr [1:9] "rcspline" "category" "rcspline" "rcspline" ... ..$ assume.code : int [1:9] 4 5 4 4 4 1 1 1 9 ..$ parms :List of 6 .. ..$ Age : num [1:3] 35 50 65 .. ..$ Sex : chr [1:2] "Female" "Male" .. ..$ BL_HD...
2004 Sep 09
2
Rd syntax error detected in CRAN daily checks
...later computed, so the predictions will be incorrect. The functions listed here solve that problem. \code{asis} is the identity transformation, \code{pol} is an ordinary (non-orthogonal) polynomial, \code{rcs} is a linear tail-restricted cubic spline function (natural spline, for which the \code{rcspline.eval} function generates the design matrix), \code{catg} is for a categorical variable, \code{scored} is for an ordered categorical variable, \code{strat} is for a stratification factor in a Cox model, \code{matrx} is for a matrix predictor, and \code{\%ia\%} represents restricted interactions in w...
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),
2013 Nov 23
0
Hmisc package 3.13-0
...nvironment for including a series of thermometers inside LaTeX text. This is intended especially for figure captions where the analyst wishes to provide a snapshot of the fraction of observations that are used in the current graphic. The dotchart3 function is an improvement of dotchart2. The rcspline.eval function, used by the rms package's rcs function, has better default knot placement for restricted cubic splines (natural splines) when there are ties in the predictor at the lowest or highest value (e.g., clumping at zero). The most recent updates to Hmisc are * Changed n locatio...
2009 Jul 02
1
Problem with groupedData and lme
...ight","grouping","sex") > modelVar <- c("GA_","VARI1","id","v51026") > names(modelVar) <- varInOrder > > ## The following re-expresses the time in the spline basis. > GASpline <- rcspline.eval(input.population[,modelVar["GA"]], > > knots=quantile(input.population[,modelVar["GA"]], > > probs=qVec<-c(0.05,0.275,0.5,0.725,0.95),na.rm=TRUE), >...