Perform Linear and Logarithmic Regressions in a Data Set with Multiple "x variables"

artuzelaya

New Member
Joined
May 10, 2022
Messages
1
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2011
Platform
  1. Windows
Hello guys. As you can see from the title, I need to perform both linear and logarithmic regressions in a a data sets that contains multiple x variables. The data set contains 18 columns (17 columns with the x values and 1 column with the y value). I need to perform a normal linear and logarithmic regression (which shows the effect of "x" on y to vary) and one that does not.

Additional information: As you can see, there are 18 columns in the mini spreadsheet. The y-variable is the in column A, whereas the other columns represent the x-variables

Sample Residential Water Demand Data.xls
ABCDEFGHIJKLMNOPQR
1wwbillmonthyeardateuidbrbonebtwounemratetotprecipavemxtemprestrictponeptwopthreefcbpdays
2118024.0799999282001152141010000100004.4000000950.51999998185.0599975600.0167299990.0167299990.0167299990.14000000130.99999809
3221041.1699981792001152441010000100004.5999999051.96000003878.4700012200.0167299990.0167299990.0167299990.14000000130.00000191
459013.93000031102001152731010000100005.1999998090.0267.6200027500.0167299990.0167299990.0167299990.14000000128.99999809
52208.43999958112001153071010000100005.9000000950.37000000557.1199989300.0167299990.0167299990.0167299990.14000000134
61707.039999962122001153371010000100006.3000001910.07999999846.7000007600.0167299990.0167299990.0167299990.14000000130.00000191
72709.14000034312002153701010000100007.1999998090.2541.7599983200.0167299990.0167299990.0167299990.14000000133.00000381
82007.55000019132002154001010000100006.6999998090.11999999745.6300010700.0167299990.0167299990.0167299990.14000000130.00000191
92308.1899995842002154311010000100006.1999998090.2899999925300.0167299990.0167299990.0167299990.14000000130.99999809
1086018.4500007642002154601010000100006.1999998090.0265.3399963400.0167299990.0167299990.0167299990.14000000128.99999809
11181034.3400001552002154891010000100005.5999999051.12000000570.3399963400.0167299990.0167299990.0167299990.14000000128.99999809
12129025.6399993962002155181010000100006.4000000951.16999995785.4100036610.0167299990.0167299990.0167299990.14000000128.99999809
13218042.1100006172002155501199929996.0999999051.62000000588.5599975610.0151999970.0190999990.0226999990.14000000132
14184035.2999992482002155791199929995.6999998090.43000000785.9300003110.0151999970.0190999990.0226999990.14000000128.99999809
15106020.5499992492002156091199929995.5999999051.2576.8700027510.0151999970.0190999990.0226999990.14000000130.00000191
1651011.81000042102002156381010000100005.5999999050.5099999961.8300018310.0151999970.0151999970.0151999970.14000000128.99999809
172007.519999981112002156701010000100005.9000000950.97000002947.8800010710.0151999970.0151999970.0151999970.14000000132
182608.710000038122002157041010000100006.0999999050.10999999944.5600013710.0151999970.0151999970.0151999970.14000000134
192007.38000011412003157351010000100006.6999998090.02999999948.5200004610.0151999970.0151999970.0151999970.14000000130.99999809
202208.8100004232003157671010000100006.8000001910.81000000238.2200012210.0154999980.0154999980.0154999980.17000000232
212308.542003157961010000100006.3000001910.83999997455.3100013710.0154999980.0154999980.0154999980.17000000228.99999809
222909.43000030542003158251010000100006.3000001910.97000002962.5200004610.0154999980.0154999980.0154999980.17000000228.99999809
23176036.93999863520031585511999299960.87000000570.5299987810.0154999980.0214999990.0249999990.17000000230.00000191
24183038.6199989362003158861199929996.9000000955.09999990573.5500030510.0154999980.0214999990.0249999990.17000000230.99999809
25150031.3500003872003159161199929996.5999999051.13999998691.7699966410.0154999980.0214999990.0249999990.17000000230.00000191
26112023.0100002382003159451199929996.1999998090.89999997687.2799987810.0154999980.0214999990.0249999990.17000000228.99999809
2790019.04999924920031597511999299961.57000005272.8300018310.0154999980.0214999990.0249999990.17000000230.00000191
2887018.59000015102003160051010000100005.8000001910.0770.7699966410.0154999980.0154999980.0154999980.17000000230.00000191
Sheet1
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Welcome to Mr. Excel.

You be able to do the linear regression, one by one, using the Analysis ToolPak (an addin).
If you create additional columns with the natural log of the respective x-values, you should then be able to do the log regression.

This is what I got for the linear regression for the first x-column (col B)

MISC1 (version 1).xlsb
ABCDEFGHI
1SUMMARY OUTPUT
2
3Regression Statistics
4Multiple R0.9964597
5R Square0.992932
6Adjusted R Square0.9926492
7Standard Error59.65335
8Observations27
9
10ANOVA
11dfSSMSFSignificance F
12Regression112497703.61124977043512.0492.0715E-28
13Residual2588963.054523558.522
14Total2612586666.67
15
16CoefficientsStandard Errort StatP-valueLower 95%Upper 95%Lower 95.0%Upper 95.0%
17Intercept-224.0480322.01083582-10.1792.24E-10-269.380197-178.715867-269.380197-178.715867
18X Variable 157.1659790.96462247559.262542.07E-2855.179302259.152656655.179302259.1526566
19
Sheet4
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

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