similar to: Question about model selection for glm -- how to select features based on BIC?

Displaying 20 results from an estimated 11000 matches similar to: "Question about model selection for glm -- how to select features based on BIC?"

2011 Sep 01
4
Question about BIC of two different regression models? how should we compare two regression models?
Hi All,  In order to compare two different logistic regressions, I think I need to compare them based on their BIC values, but I am not sure if the smaller BIC would mean a better model or the reverse is true? Thanks a lot,Andra [[alternative HTML version deleted]]
2011 Aug 26
2
How to find the accuracy of the predicted glm model with family = binomial (link = logit)
Hi All, When modeling with glm and family = binomial (link = logit) and response values of 0 and 1, I get the predicted probabilities of assigning to my class one, then I would like to compare it with my vector y which does have the original labels. How should I change the probabilities into values of zero and 1 and then compare it with my vector y to find out about the accuracy of my
2011 Aug 23
3
GLM question
Hi All, I am trying to fit my data with glm model, my data is a matrix of size n*100. So, I have n rows and 100 columns and my vector y is of size n which contains the labels (0 or 1) My question is: instead of manually typing the model as glm.fit = glm(y~ x[,1]+x[,2]+...+x[,100], family=binomial()) I have a for loop as follows that concatenates the x variables as follows: final_str=NULL for
2012 Jan 06
3
How to fit my data with a distribution?
Dear All, I have a bunch of data points as follows: x  100 y  200 z  300 ... where 100, 200, 300 are the values. I would like to know the distribution of my data? how can I fit my data into a distribution? Thanks a lot, Andra [[alternative HTML version deleted]]
2011 Aug 20
2
a Question regarding glm for linear regression
Hello All, I have a question about glm in R. I would like to fit a model with glm function, I have a vector y (size n) which is my response variable and I have matrix X which is by size (n*f) where f is the number of features or columns. I have about 80 features, and when I fit a model using the following formula,? glmfit = glm(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13
2011 Aug 27
1
Grouping variables in a data frame
Hi All, I have a data frame as follow: user_id time age location gender ..... and I learn a logistic regression to learn the weights (glm with family= (link = logit))), my response value is either zero or one. I would like to group the users based on user_id and time and see the y values and predicted y values at the same time. Or plot them some how. Is there any way to somehow group them
2011 Aug 24
1
How to do cross validation with glm?
Hi All, I have a fitted model called glm.fit which I used glm and data dat is my data frame pred= predict(glm.fit, data = dat, type="response") to predict how it predicts on my whole data but obviously I have to do cross-validation to train the model on one part of my data and predict on the other part. So, I searched for it and I found a function cv.glm which is in package boot.
2011 Sep 08
1
Plotting question
Hi All,  I am plotting different lines in my graph and the problem I have is that if the first plot has smaller y value than the second plot, I will not be able to see the the top part of the graph. I do the following:plot(p1, avg="vertical", lwd=3, col="red", main ="all graphs")plot(p2, avg="vertical", lwd=3, col="pink", add = TRUE) where p1 and
2011 Aug 11
1
Cv.glment question -- why giving me an error
Hi All,  I am trying to run cv.glmnet(x,y,family="multinomial", nfolds =4) and I only have 8 observations and the number of features I have is 1000, so my x matrix is 8 by 1000 and when I run the following, I get this error, I am not sure what is causing this problem.  Error in predmat[which, , seq(nlami)] = preds :   number of items to replace is not a multiple of replacement length Can
2011 Sep 03
2
ROCR package question for evaluating two regression models
Hello All,  I have used logistic regression glm in R and I am evaluating two models both learned with glm but with different predictors. model1 <- glm (Y ~ x4+ x5+ x6+ x7, data = dat, family = binomial(link=logit))model2 <- glm (Y~ x1 + x2 +x3 , data = dat, family = binomial(link=logit))  and I would like to compare these two models based on the prediction that I get from each model: pred1 =
2011 Aug 10
2
glmnet
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y, family="multinomial")I have been following this
2011 Aug 25
1
How to combine two learned regression models?
Hi All, I have a set of features of size p and I would like to separate my feature space into two sets so that p = p1 + p2, p1 is a set of features and p2 is another set of features and I want to fit a glm model for each sets of features separately. Then I want to combine the results of two glm models with a parameter beta. For example, beta * F(p1) + (1-beta) * F(p2) where F(p1) is a learned
2011 Aug 11
1
Question about NULL matrix? Can I define a NULL matrix in R?
Hi All,  I would like to create a matrix in R but I dont know the size of my matrix. I only know the size of the columns but not the size of the rows. So, is there any way to create a dynamic matrix of size NULL by n_cols? and then add to that matrix? I know for a vector, I can do this: x= NULL but is there any way to do the same for a matrix as well? Thanks a lot,Andra [[alternative HTML version
2011 Aug 29
1
How to order based on the second two columns?
Hello All, I have a data frame consisting of 4 columns (id1, id2, y, pred) where pred is the predicted value based on the glm function and my data frame is called "all". "data" is another data frame that has all data but I want to put together some important columns from my original data frame (data) into another data frame (all) as follows and I would like them to be sorted
2005 Oct 16
1
BIC doesn't work for glm(family=binomial()) (PR#8208)
Full_Name: Ju-Sung Lee Version: 2.2.0 OS: Windows XP Submission from: (NULL) (66.93.61.221) BIC() requires the attribute $nobs from the logLik object but the logLik of a glm(formula,family=binomial()) object does not include $nobs. Adding attr(obj,'nobs') = value, seems to allow BIC() to work. Reproducing the problem: library(nmle); BIC(logLik(glm(1~1,family=binomial())));
2010 Aug 17
2
how to selection model by BIC
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based on AIC, what the differences between the function "dredge" in
2007 Sep 17
1
Stepwise logistic model selection using Cp and BIC criteria
Hi, Is there any package for logistic model selection using BIC and Mallow's Cp statistic? If not, then kindly suggest me some ways to deal with these problems. Thanks. -- View this message in context: http://www.nabble.com/Stepwise-logistic-model-selection-using-Cp-and-BIC-criteria-tf4464430.html#a12729613 Sent from the R help mailing list archive at Nabble.com.
2001 Mar 05
1
Model selection with BIC
Is there an efficient way to do linear model selection by choosing the model with the highest BIC from all possible models? ______________________________________________________________________ Stuart Luppescu -=-=- University of Chicago $(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu http://www.consortium-chicago.org/people/sl.html http://musuko.uchicago.edu/pubkey.asc
2008 Jan 20
0
model selection method - step() or bic.glm()
Dear R-helpers, I'm considering two methods of selecting a poisson regression model within R: 1. Using the step() function (stats package) to find the best model by a stepwise algorithm and AIC 2. Using the bic.glm() function (BMA package) to find the best model by Bayesian Model Averaging and BIC Are these both reasonable methods for model selection or is one clearly more appropriate than
2001 Feb 22
1
bic.logit
I have been contacted by a researcher who would like to use the bic.logit function (http://lib.stat.cmu.edu/S/bic.logit) for S-PLUS which applies Bayesian Model Averaging to variable selection for logistic regression. I can see that the S-PLUS function uses a call to a Fortran "leaps" function, which does not seem to be available in R. Has this method or a similar method been ported to