简体   繁体   中英

Excel Regression with Multiple Data Sets

I have a dataset of job titles, salaries, and experience levels. I want to regress salary on experience BY job title. (IE several different regression analyses, one for each job title). Any way to do this without separating or sorting the data? I think an array formula plus INTERCEPT and SLOPE might do it?

You are correct. For single-term models, SLOPE , INTERCEPT , and RSQ as array formulas will do it:

=SLOPE(IF(Table1[Job Title]=E2,Table1[Salary]),IF(Table1[Job Title]=E2,Table1[Experience]))

Just change SLOPE to INTERCEPT or RSQ to get those values.

在此处输入图片说明

您还可以使用数据分析工具库,内置回归工具。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM