Can I Use an IF Statement for Regression in Excel?

Click For Summary
Using an IF statement for regression in Excel is not straightforward, especially when filtering data based on conditions like "Vacant = 1." The user attempted to apply the IF function but encountered issues with the regression not accepting "false" values. A practical solution is to sort the data by the vacancy column and create a scatter plot for the vacant houses. This approach allows for a focused regression analysis, resulting in a model of Price = 69.9 * SQFT - 4793. Excel's hands-on nature facilitates this method effectively.
MaxManus
Messages
268
Reaction score
1
Regression in Excel

I want to make an regression of some data, but I only want to use some of the data. The data I want use is where Vacant = 1.
Is this possible in excel?

I have tried to use the if-function but the regression does not like "false"


More info

I want to make a regression of Price = B1 + B2*sqft for the vacant houses.
 

Attachments

Last edited:
Physics news on Phys.org
Excel is mostly hands-on

The simple solution is sort on the vacancy column and then graph the data with vacancy=1 using scatter plot.
This would be the result: price = 69.9 SQFT - 4793
 

Attachments

Thanks.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 23 ·
Replies
23
Views
4K
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K