similar to: model.frame and predvars

Displaying 20 results from an estimated 200 matches similar to: "model.frame and predvars"

2007 Dec 05
4
coxme frailty model standard errors?
Hello, I am running R 2.6.1 on windows xp I am trying to fit a cox proportional hazard model with a shared Gaussian frailty term using coxme My model is specified as: nofit1<-coxme(Surv(Age,cen1new)~ Sex+bo2+bo3,random=~1|isl,data=mydat) With x1-x3 being dummy variables, and isl being the community level variable with 4 levels. Does anyone know if there is a way to get the standard error
2012 Feb 03
1
coxme with frailty--variance of random effect?
Dear all, This probably stems from my lack of understanding of the model, but I do not understand the variance of the random effect reported in coxme. Consider the following toy example: #------------------------------- BEGINNING OF CODE ------------------------------------------------ library(survival) library(coxme) #--- Generate toy data: d <- data.frame(id = c(1:100), #
2010 Apr 06
0
Strange error
Someone just sent me a data set that causes the lmekin function, part of the kinship package, to fail. In chasing it down I get an error I have never seen before. fit <- lmekin(icam1 ~ factor(center) + age + factor(sex), random= ~1|iid, data=chaidata, varlist=kmat) Error in Y - fitted : non-numeric argument to binary operator Add the recover option, and the offending lines are
2009 Jun 29
0
nlsList {nlme} - control arguments problem
Hi All. I'd like to send some control arguments to the nls function when performing a nlsList analysis. I'm fitting a power model to some grouped data and would like to impose lower bounds on the estimates using the "port" algorithm. Obtaining the lower bound constraint works fine with a direct call to nls for a single level of the grouping variable. ?However, the bounds
2009 Apr 03
2
Schoenfeld Residuals
Dear All, Sorry to bother you again. I have a model: coxfita=coxph(Surv(rem.Remtime/365,rem.Rcens)~all.sex,data=nearma) and I'm trying to do a plot of Schoenfeld residuals using the code: plot(cox.zph(coxfita)) abline(h=0,lty=3) The error message I get is: Error in plot.window(...) : need finite 'ylim' values In addition: Warning messages: 1: In sqrt(x$var[i, i] * seval) : NaNs
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi, I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this: library(survival) data(lung) lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung) # lung.byPS Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung) 1
2009 Aug 01
2
Cox ridge regression
Hello, I have questions regarding penalized Cox regression using survival package (functions coxph() and ridge()). I am using R 2.8.0 on Ubuntu Linux and survival package version 2.35-4. Question 1. Consider the following example from help(ridge): > fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), ovarian) As I understand, this builds a model in which `rx' is
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recursive partitioning using the rpart
2010 Apr 15
0
nlsList {nlme} - control arguments problem
Hi Rick Thanks to Dieter Menne I did manage to solve the problem of imposing bounds on the parameter space duirng an nlsList fit. He suggested using optim to optimize the parameters prior to each fit. This worked well for me as I had a customized selfStart function that then optimized the parameters for each individual separately. if you rewrote your selfStart function as: powrDpltInit <-
2008 Mar 03
1
Problem plotting curve on survival curve
Calum had a long question about drawing survival curves after fitting a Weibull model, using pweibull, which I have not reproduced. It is easier to get survival curves using the predict function. Here is a simple example: > library(survival) > tfit <- survreg(Surv(time, status) ~ factor(ph.ecog), data=lung) > table(lung$ph.ecog) 0 1 2 3 <NA> 63 113 50 1
2011 Oct 29
1
How to plot survival data from multiple trials (simulations)?
Dear all: Could anyone please provide some R codes to plot the below survival data to compare two groups (0 vs 1) after 2 simulations (TRL)? need 95% prediction interval on the plot from these 2 trials. I would like to simulate 1000 trials later. Thanks a lot for your great help and consideration! yan TRL ID ECOG BASE PTR8 GROUP POP ST ind 1 1 1 1 2.2636717 0.255634126 1 1 99.4 F 3 1 2 1
2011 Feb 19
0
contrasting Somer's D from Design package
Dear R help, I am having a problem with the Design package and my problem is detailed here. I fit a cox model to my data and validate the Somer's Dxy using the Design package. (Because of computation time problem, i only try 10 bootstrap samples for the time being) This is the model without stratification: > library(Design) >
2010 Jun 22
0
survfit function - event information??
--begin inclusion --- I am trying to extract output information from the survfit function in order to generate a matrix of select output for multiple factors. Specifically, I am interested in extracting the number of events (in the output below: 106, 2, 3). The variable names represented in my function (ee) are shown below, but none of those variables correspond to the column of events as shown
2009 Feb 06
1
Using subset in validate() in Design, what is the correct syntax?
Hi I am trying to understand how to get the validate() function in Design to work with the subset option. I tried this: ovarian.cph=cph(Surv(futime, fustat) ~ age+factor(ecog.ps)+strat(rx), time.inc=1000, x=T, y=T, data=ovarian) validate(ovarian.cph) #fine when no subset is used, but the following two don't work: > validate(ovarian.cph, subset=ovarian$ecog.ps==2) Error in
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),
2010 Dec 02
0
survival - summary and score test for ridge coxph()
It seems to me that summary for ridge coxph() prints summary but returns NULL. It is not a big issue because one can calculate statistics directly from a coxph.object. However, for some reason the score test is not calculated for ridge coxph(), i.e score nor rscore components are not included in the coxph object when ridge is specified. Please find the code below. I use 2.9.2 R with 2.35-4 version
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,
2005 Nov 27
1
the output of coxph
Dear All: I have some questions about the output of coxph. Below is the input and output: ---------------------------------------- > coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data = + ovarian, x = TRUE) Call: coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data = ovarian, x = TRUE) coef exp(coef) se(coef) z p age 0.147 1.158
2010 Feb 16
1
survival - ratio likelihood for ridge coxph()
It seems to me that R returns the unpenalized log-likelihood for the ratio likelihood test when ridge regression Cox proportional model is implemented. Is this as expected? In the example below, if I am not mistaken, fit$loglik[2] is unpenalized log-likelihood for the final estimates of coefficients. I would expect to get the penalized log-likelihood. I would like to check if this is as expected.
2009 Nov 13
2
survreg function in survival package
Hi, Is it normal to get intercept in the list of covariates in the output of survreg function with standard error, z, p.value etc? Does it mean that intercept was fitted with the covariates? Does Value column represent coefficients or some thing else? Regards, ------------------------------------------------- tmp = survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian,