similar to: Subject: glm and stepAIC selects too many effects

Displaying 20 results from an estimated 10000 matches similar to: "Subject: glm and stepAIC selects too many effects"

2017 Jun 06
0
Subject: glm and stepAIC selects too many effects
More principled would be to use a lasso-type approach, which combines selection and estimation in one fell swoop! Ravi ________________________________ From: Ravi Varadhan Sent: Tuesday, June 6, 2017 10:16 AM To: r-help at r-project.org Subject: Subject: [R] glm and stepAIC selects too many effects If AIC is giving you a model that is too large, then use BIC (log(n) as the penalty for adding
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]]
2007 Jul 11
1
Stepwise GLM selection by LRT?
Dear List, having searched the help and archives, I have the impression that there is no automatic model selection procedure implemented in R that includes/excludes predictors in logistic regression models based on LRT P-values. Is that true, or is someone aware of an appropriate function somewhere in a custom package? Even if automatic model selection and LRT might not be the most appropriate
2006 Sep 15
2
LARS for generalized linear models
Hi, Is there an R implementation of least angle regression for binary response modeling? I know that this question has been asked before, and I am also aware of the "lasso2" package, but that only implements an L1 penalty, i.e. the Lasso approach. Madigan and Ridgeway in their discussion of Efron et al (2004) describe a LARS-type algorithm for generalized linear models. Has
2017 Jun 06
1
glm and stepAIC selects too many effects
This is a question at the border between stats and r. When I do a glm with many potential effects, and select a model using stepAIC, many independent variables are selected even if there are no relationship between dependent variable and the effects (all are random numbers). Do someone has a solution to prevent this effect ? Is it related to Bonferoni correction ? Is there is a ratio of
2009 May 07
1
Step and stepAIC
Hi all,   I’m using "step" and "stepAIC" for stepwise regression. After each step, I would like to make an additional calculation based on the independent variables that have been selected until this step and their corresponding weights. Where do I have to add this calculation?   And a second question: Is it possible, to define a certain limit of factors for the regression,
2013 Jan 30
1
starting values in glm(..., family = binomial(link =log))
Try this: Age_log_model = glm(Arthrose ~ Alter, data=x, start=c(-1, 0), family=quasibinomial(link = log)) Ravi Ravi Varadhan, Ph.D. Assistant Professor The Center on Aging and Health Division of Geriatric Medicine & Gerontology Johns Hopkins University rvaradhan@jhmi.edu<mailto:rvaradhan@jhmi.edu> 410-502-2619 [[alternative HTML version deleted]]
2009 Jan 26
1
glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
Problem: I am sorting through model selection process for first time and want to make sure that I have used glm, stepAIC, and update correctly. Something is strange because I get a different result between: 1) a glm of 12 predictor variables followed by a stepAIC where all interactions are considered and then an update to remove one specific interaction. vs. 2) entering all the terms
2007 Feb 23
1
Bootstrapping stepAIC() with glm.nb()
Dear all, I would like to Boostrap the stepAIC() procedure from package MASS for variety of model objects, i.e., fn <- function(object, data, B = 2){ n <- nrow(data) res <- vector(mode = "list", length = B) index <- sample(n, n * B, replace = TRUE) dim(index) <- c(n, B) for (i in 1:B) { up.obj <- update(object, data = data[index[, i], ])
2002 Mar 01
2
step, leaps, lasso, LSE or what?
Hi, I am trying to understand the alternative methods that are available for selecting variables in a regression without simply imposing my own bias (having "good judgement"). The methods implimented in leaps and step and stepAIC seem to fall into the general class of stepwise procedures. But these are commonly condemmed for inducing overfitting. In Hastie, Tibshirani and Friedman
2007 Jun 20
4
finding roots of multivariate equation
Hello, I want to find the roots of an equation in two variables. I am aware of the uniroot function, which can do this for a function with a single variable (as I understand it...) but cannot find a function that does this for an equation with more than one variable. I am looking for something implementing similar to a Newton-Raphson algorithm. Thanks. -- Bill Shipley North American Editor for
2010 Apr 02
2
Cross-validation for parameter selection (glm/logit)
If my aim is to select a good subset of parameters for my final logit model built using glm(). What is the best way to cross-validate the results so that they are reliable? Let's say that I have a large dataset of 1000's of observations. I split this data into two groups, one that I use for training and another for validation. First I use the training set to build a model, and the the
2009 Jul 10
1
generalized linear model (glm) and "stepAIC"
Hi, I'm a very new user of R and I hope not to be too "basic" (I tried to find the answer to my questions by other ways but I was not able to). I have 12 response variables (species growth rates) and two environmental factors that I want to test to find out a possible relation. The sample size is quite small: (7<n<12, depending on each species-case). I performed a
2008 Apr 09
4
Skipping specified rows in scan or read.table
Hi, I have a data file, certain lines of which are character fields. I would like to skip these rows, and read the data file as a numeric data frame. I know that I can skip lines at the beginning with read.table and scan, but is there a way to skip a specified sequence of lines (e.g., 1, 2, 10, 11, 19, 20, 28, 29, etc.) ? If I read the entire data file, and then delete the character
2010 Jul 23
5
UseR! 2010 - my impressions
Dear UseRs!, Everything about UseR! 2010 was terrific! I really mean "everything" - the tutorials, invited talks, kaleidoscope sessions, focus sessions, breakfast, snacks, lunch, conference dinner, shuttle services, and the participants. The organization was fabulous. NIST were gracious hosts, and provided top notch facilities. The rousing speech by Antonio Possolo, who is the chief
2008 Mar 12
3
Types of quadrature
Dear R-users I would like to integrate something like \int_k^\infty (1 - F(x)) dx, where F(.) is a cumulative distribution function. As mentioned in the "integrate" help-page: integrate(dnorm,0,20000) ## fails on many systems. This does not happen for an adaptive Simpson or Lobatto quadrature (cf. Matlab). Even though I am hardly familiar with numerical integration the implementation
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
Hi, I would like to solve a system of coupled ordinary differential equations, where there is a delay (time lag) term. I would like to use the "lsoda" function "odesolve" package. However, I am not sure how to specify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve)
2007 Feb 01
3
Need help writing a faster code
Hi, I apologize for this repeat posting, which I first posted yesterday. I would appreciate any hints on solving this problem: I have two matrices A (m x 2) and B (n x 2), where m and n are large integers (on the order of 10^4). I am looking for an efficient way to create another matrix, W (m x n), which can be defined as follows: for (i in 1:m){ for (j in 1:n) { W[i,j] <-
2009 Oct 15
4
Generating a stochastic matrix with a specified second dominant eigenvalue
Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to \lambda (Note: the dominant eigenvalue of a stochastic matrix is 1). I don't care what the other eigenvalues are. The second eigenvalue is
2011 Jun 24
4
How to capture console output in a numeric format
Hi, I would like to know how to capture the console output from running an algorithm for further analysis. I can capture this using capture.output() but that yields a character vector. I would like to extract the actual numeric values. Here is an example of what I am trying to do. fr <- function(x) { ## Rosenbrock Banana function on.exit(print(f)) x1 <- x[1] x2 <- x[2]