Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8635863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:04:40+00:00 2026-06-12T10:04:40+00:00

I am trying to run a stepwise regression in R with 600 odd variables

  • 0

I am trying to run a stepwise regression in R with 600 odd variables contained as the column name from the header of a .csv file.

How do i use the column name as variables in a regression equation?

I am very new to this and my limited understanding it that i can save the column as a list and use it for running a glm eg

model.1 <- glm(x~ paste(list), family= poisson, link = logit).

Any help is highly appreciated. thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:04:41+00:00Added an answer on June 12, 2026 at 10:04 am

    If you have read your data in correctly (e.g. with header=TRUE as specified in the comments above), you should end up with a 600+-column data frame (1 column for the x response, and a column for each predictor variable): I will call this mydata for now. In that case as @TylerRinker suggests you could just include all the predictors: glm(x~.,data=mydata,family=poisson) (the logit link is the default link; if you want to specify it explicitly you can say glm(x~.,data=mydata,family=poisson(link="logit")). You could then use step, or stepAIC from the MASS package.

    However, I have to add that unless you know what you’re doing, stepwise regression on 600 variables is a really, really, really BAD idea from a statistical point of view (Google something like “stepwise regression problems” or “stepwise regression Harrell”). I would strongly encourage you to take a look at something like the glmnet package, which takes a more sensible approach to modeling with lots of predictors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying run a program from a qmake .pro file which modifies the
I am trying run a batch file from my java codes, but unfortunately I
Im trying to run exe file with c++ with no luck I tried this:
Trying to run a simple svn list svn+ssh://... from within jenkins on os X,
When trying to run android application from eclipse console shows [2012-01-31 14:01:01 - Remix_6Dec11]
When trying to run my application on the emulator I get an error from
Trying to run some sql in a pl/sql procedure. Select field from schema.view; I
trying to run a simple batch file in windows 2008 task scheduler call cleanup.bat
Trying to run through a dictionary string and write the contents to file that
I am trying to run the C libraries from SIGAR API. In the include

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.