+ Reply to Thread
Results 1 to 4 of 4

Producing hundreds of Multiple Regression analysis scenarios simultaneously

  1. #1
    Registered User
    Join Date
    02-14-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    1

    Producing hundreds of Multiple Regression analysis scenarios simultaneously

    Hi All,

    I am currently working at a large technology consulting organisation and I have been tasked to make a multiple regression analysis model on Excel to predict “Wage Rates” (Column E – my dependant variable). Though I am aware how to run the analysis through the “Data Analysis” toolpak, it’s not feasible to run hundreds of regressions especially when variables are likely to be adjusted monthly.


    Having said this, is it possible to produce a VBA or Macro to have the analysis done in the file? I can run a multiple regression analysis per Role (Column D), but that would take a lot time to run it per Role (there are a number of roles per Country) and per Country (there are dozens of countries). Also, analysing what the best trend line is per output in order to formulate the most appropriate equations. Furthermore, using the Summary output to produce an equation to predict the data in the rows. I have examples for two roles, Architect and Developer – both with mock data. In the real example, I would have many more variables GDP, technology lifecycle trend etc.


    Again, would there be a function through VBA or Macros which would recognise the Country, Role, the independent variables etc. to produce many Multiple Regression Analysis results at once – based on those criteria? Even tips on how to reorganise my data for the anticipated VBA or Macro would be nice.

    I should note - I am not a VBA user at all, though I have implemented simple codes.


    Any help on how to proceed would be great.


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Producing hundreds of Multiple Regression analysis scenarios simultaneously

    Have you tried using Excel's built in worksheet functions for this?

    The regression and several of those statistics can be computed using the LINEST() function https://support.office.com/en-us/art...a-fa7abf772b6d .
    The other statistics can usually be computed from the LINEST() results or other statistical functions: https://support.office.com/en-us/art...rs=en-US&ad=US
    I cannot tell what you used for the input ranges for each individual regression, but it looks like you want to separate the the "colored" blocks. With the right combination of relative and absolute references and/or clever uses of the OFFSET() function, you can enter the LINEST() and other functions once, then copy and paste.

    I posted an example of using LINEST() and other statistics functions in this way here: http://www.excelforum.com/excel-gene...ml#post4349407
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Producing hundreds of Multiple Regression analysis scenarios simultaneously

    You have a lot of answers on this sheet. How are you generating them and which ones do you want to look at?

    LINEST might work for some of this, but I suggest that instead of using fixed ranges, you use an array formula to decide what data to look at.

    The way I would set this up is to put two pivot tables against the data - one for role and one for country. This will give me a unique list of names for each. Then set up the LINEST formulas based on ranges driven by a country and role selection. Then loop through country and role and change these cells.

    I could set this up if you will tell me which LINEST values you want to look at. Basically I'm confused by all the stuff in columns L on.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,982

    Re: Producing hundreds of Multiple Regression analysis scenarios simultaneously

    Rule 08: Cross-posting Without Links

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Regression Analysis
    By wwob in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 03-18-2015, 08:28 PM
  2. Multivariate multiple regression analysis
    By tuna666 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-26-2013, 08:33 AM
  3. Regression Analysis Help
    By benevolentspaceman in forum Excel General
    Replies: 6
    Last Post: 05-27-2011, 01:17 PM
  4. Regression analysis does not add up :s
    By pepsi in forum Excel General
    Replies: 8
    Last Post: 02-21-2010, 10:53 AM
  5. Regression analysis
    By AOL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2009, 01:14 PM
  6. Data Analysis Add In - Storing Multiple Regression Coefficients
    By kilmacanty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-05-2008, 01:11 PM
  7. [SOLVED] example of a polynomial regression analysis
    By Houston banker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-28-2005, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1