similar to: how to suppress the output from stepAIC?

Displaying 20 results from an estimated 10000 matches similar to: "how to suppress the output from stepAIC?"

2006 May 07
1
model selection, stepAIC(), and coxph() (fwd)
Hello, My question concerns model selection, stepAIC(), add1(), and coxph(). In Venables and Ripley (3rd Ed) pp389-390 there is an example of using stepAIC() for the automated selection of a coxph model for VA lung cancer data. A statistics question: Can partial likelihoods be interpreted in the same manner as likelihoods with respect to information based criterion and likelihood ratio tests?
2009 Jan 28
1
StepAIC with coxph
Hi, i'm trying to apply StepAIC with coxph...but i have the same error: stepAIC(fitBMT) Start: AIC=327.77 Surv(TEMPO,morto==1) ˜ VOD + SESSO + ETA + ........ Error in dropterm.default(fit,scope$drop, scale=scale,trace=max(0, : number of rows in use has changed: remove missing values? anybody know this error?? Thanks. Michele [[alternative HTML version deleted]]
2009 Nov 05
1
stepAIC(coxph) forward selection
Dear R-Help, I am trying to perform forward selection on the following coxph model: >my.bpfs <- Surv(bcox$pfsdays, bcox$pfscensor) > b.cox <- coxph(my.bpfs ~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age)>stepAIC(b.cox, scope=list(upper =~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age, lower=~1), direction= c("forward")) However
2000 Mar 16
1
stepAIC and coxph objects with cluster(id)
Is it appropriate to use stepAIC (library MASS) with coxph objects (from library survival5) that use "cluster(id)"? It is my understanding that, when using "cluster(id)", we can test for sets of terms by using the methods in Wei et al., (1989; JASA, 84: 1065-1073), or as explained in pp. 53 and ff. of the survival.ps document. But if we use a likelihood ratio test instead
2009 Jun 22
2
what's the R command to make the following?
Hi, I have a simple question, suppose I have the date "05/16/2008", what would be the command to get the month, day and year? Thanks, -Jack [[alternative HTML version deleted]]
2003 May 02
2
stepAIC/lme (1.6.2)
Based on the stepAIC help, I have assumed that it only was for lm, aov, and glm models. I gather from the following correspondence that it also works with lme models. Thomas Lumley 07:40 a.m. 28/04/03 -0700 4 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 04:19 p.m. 28/04/03 +0100 6 Re: [R] stepAIC/lme problem (1.7.0 only) Prof Brian Ripley 06:09 p.m. 29/04/03 +0100 6 Re: [R]
2005 Oct 24
1
Error in step() (or stepAIC) for Cox model
Hello all, I am trying to use stepwise procedure to select covariates in Cox model and use bootstrap to repeat stepwise selection, then record how many times variables are chosen by step() in bootstrap replications. When I use step() (or stepAIC) to do model selection, I got errors. Here is the part of my code for (j in 1:mm){ #<--mm=10 for (b in 1:nrow(reg.bs)){ #<--bootstrap 10
2004 Nov 02
0
StepAIC with coxph
Hi, I'm having a bit of trouble with using StepAIC with a coxph model. Can anybody tell me if there is anything wrong with what I am doing here (I've removed a few of the variables for the purpose of this email, I had about 20 before): start<- coxph(Surv(entryage2,age_at_death_yr,death)~finih5+prev+magegp+zpluralgp ,data=project_model1) fmAIC1 <-
2010 Mar 12
3
how to plot only the upper triangle using the pairs function?
Hi, I am trying to use function pairs to plot the scatterplot, but I only want to keep the upper triangle, what's the argument to do this? Thanks, -Jack [[alternative HTML version deleted]]
2008 Sep 18
2
Coxph and loglik converged before variable X
Hi, I'm doing some coxph fits using the survival package. There are a large number of potential predictors and so I was considering using stepAIC for model selection. However, in the early stages I'm getting complaints like the following: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 1,2 ; beta may be infinite.
2009 May 22
1
Forcing a variableinto a model using stepAIC
Dear All, I am attempting to use forward and/or backward selection to determine the best model for the variables I have. Unfortunately, because I am dealing with patients and every patient is receiving treatment I need to force the variable for treatment into the model. Is there a way to do this using R? (Additionally, the model is stratified by randomisation period). I know that SAS can be
2005 Oct 25
0
One more about Error in step() (or stepAIC) for Cox model
Thank you for Prof.Ripley's suggestion. I fixed the program by adding a lower scope, and the program ran, but I still got warning messages, and don't know what is going on, would this affect my results? ... Step: AIC= 12337.74 Surv(tlfup, cen) ~ MI[[j]]$trt + MI[[j]]$agem40 + MI[[j]]$agem40sq + mhtypeed1 + mhtypeed2 Df AIC <none> 12338 -
2005 Jun 23
0
Error in stepAIC function using a survival model
I keep getting the same error in my survival analysis. I have access to a very large database but am just using small subsets to get some results. In this particular subset there is 50 explanatory variables(both factors of many levels and covariates) and 117 data pieces with some of the data being censored. I am using the stepAIC command to find my model. My initial model is built from all
2011 Aug 17
2
question regarding gregexpr and read.table
Hi, I have a silly question regarding the usage of two commands: read.table and gregexpr: For read.table, if I read a matrix and set header = T, I found that all the dash ("-") becomes dots (".") A = read.table("Matrix.txt", sep = "\t", header = F) A[1,1] # "A-B-C-D". A = read.table("Matrix.txt", sep = "\t", header = T)
2003 Aug 04
1
Error in calling stepAIC() from within a function
Hi, I am experiencing a baffling behaviour of stepAIC(), and I hope to get any advice/help on what went wrong or I'd missed. I greatly appreciate any advice given. I am using stepAIC() to, say, select a model via stepwise selection method. R Version : 1.7.1 Windows ME Many thanks and best regards, Siew-Leng ***Issue : When stepAIC() is placed within a function, it seems
2006 Oct 11
1
Bug in stepAIC?
Hi, First of all, thanks for the great work on R in general, and MASS in particular. It's been a life saver for me many times. However, I think I've discovered a bug. It seems that, when I use weights during an initial least-squares regression fit, and later try to add terms using stepAIC(), it uses the weights when looking to remove terms, but not when looking to add them:
2008 Dec 09
1
Can elastic net do binary classification?
Hi, List The elastic net package (by Hastie and Zou at Stanford) is used to do regularization and variable selection, it can also do regression. I am wondering if it can perform binary classification (discrete outcome). Anybody having similar experience? Many thanks, -Jack [[alternative HTML version deleted]]
2008 Jan 10
1
question on how to extract values from atomic vector
Dear List, I have an atomic vector named "Results" Results [1] 1 1 1 attr(,"prob") [1] 0.6666667 1.0000000 1.0000000 Levels: 0 1 when I type attributes(Results) $levels [1] "0" "1" $class [1] "factor" $prob [1] 0.6666667 1.0000000 1.0000000 However, when I type Results$prob It has the following warning message: NULL Warning message: In
2008 Jan 19
1
how to use different variable to store values with different length in a loop
Hi, List I am trying to use variables named A1, A2, ..., A100 to store some values, each variable could store some values with different length, how can I achieve this? Thanks, Jack [[alternative HTML version deleted]]
2011 Aug 17
1
question regarding headers with space in the names
Hi, After I read an xlsx file into the work space: A <- read.xlsx("B.xls", header = T, check.names = F) There are several headers with the names like: colnames(A) [1:4] # [1] "A 1" "B" [3] "C 2" "D" I can get the content of column 2 and column 4 easily by A$B or A$D However, I can not type