Regression Analysis

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
Is it possible to do a regression analysis on a set of data, but only if it matches a certain criteria?

I want to do a regression analysis on 2 sets of data: Driver Points and Number of Accidents

However I only want to look at those drivers with 0-6 Driver Points and my data includes data for driver points above that.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Is it possible to do a regression analysis on a set of data, but only if it matches a certain criteria?

I want to do a regression analysis on 2 sets of data: Driver Points and Number of Accidents

However I only want to look at those drivers with 0-6 Driver Points and my data includes data for driver points above that.

Hi,

The Regression Wizard in the Analysis Toolpack (at least in the version I use) only takes into account visible cells. So if you put a filter on the column with Driver Points to show only the data you want (drivers with 0-6 Driver Points) and then run the regression analysis this should give you what you're after. Obviously the results are static so you can take the filters off after you're done without affecting the output.


Cheers =]
 
Upvote 0
Doesn't seem to work, I get an error message when trying to do the regression analysis on the filtered table which reads 'Regression - Input range contains non-numeric data'

Any idea why this would be? The regression analysis works fine if I don't filter the table.
 
Upvote 0
Hi,

Not to ask a dumb question but have you included the column headers in the range?

I just double checked on some sample data of my own and that's error you get when you include the column headers (or indeed if there is text in the data, even things like spaces) but otherwise it worked for me.

Can you check to see whether there are any non-numeric values anywhere in the data (e.g. does the analysis tool work without the filters on?)
 
Upvote 0
Hi Noz2k

It's a good practice to post a sample of input data, the logic and the expected result. This means that you, the members contributing to the thread and everyone reading and thinking about the problem will get the same results. This helps not only understanding the problem but also debugging and testing.


See rule 13 in the posting rules:

  1. Provide background information for your question. Include sample data and formulas in your post. The more you tell us up front, the easier it is for us to answer your questions. If your formulas aren't giving the results you want, include the results you want as well as the results you are currently getting. Your post should include at least:
  2. some sample data
  3. your current formula
  4. your current results
  5. an explanation of why your current results are not what you want
  6. the result you want

http://www.mrexcel.com/forum/showthread.php?t=127080
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top