title: How to predict prices in house price competition in kaggle using R?
body: <p>I take part in kaggle competition: <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data" rel="nofollow noreferrer">House Prices: Advanced Regression Techniques</a>.
  As a baseline I want to create linear regression.
  At first, I clean my data.
  Secondly, I select only numeric variables.</p>
  <pre><code>data_num&lt;-data[sapply(data, function(x) is.numeric(x))]
  train&lt;-data_num[1:1460,]
  test&lt;-data_num[1461:nrow(data_num),]
  </code></pre>
  <p>Then I plot histogram to see distribution of SalePrice. As we see, here there is a skewness.
  <a href="https://i.stack.imgur.com/6Wxmn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Wxmn.png" alt="enter image description here" /></a>
  Because of this, I create log(SalePrice). It's better.
  <a href="https://i.stack.imgur.com/S7Hli.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S7Hli.png" alt="enter image description here" /></a></p>
  <p>My linear model:
  model&lt;-lm(SalePrice~.,train)
  summary(model)</p>
  <pre><code>model2&lt;-lm(SalePrice~LotArea+OverallQual+OverallCond+YearBuilt+
               MasVnrArea+ExterQual+BsmtQual+BsmtCond+BsmtFinSF1+`1stFlrSF`+  
               `2ndFlrSF`+BsmtFullBath+BedroomAbvGr+KitchenAbvGr+KitchenQual+
               TotRmsAbvGrd+GarageCars+GarageCond+WoodDeckSF+ScreenPorch,train)
  p&lt;-predict(model2, test)
  
  c&lt;-cbind(price, p)
  
  
  RMSE=sqrt(mean((log(p)-log(price$SalePrice))^2))
  </code></pre>
  <blockquote>
  <p>#RMSE 0.4215566</p>
  </blockquote>
  <ol>
  <li>Do I have the right tactic?</li>
  <li>What do I predict using log?</li>
  <li>If I plot geom_point log(actual) and log(predicted) it looks like this
  <a href="https://i.stack.imgur.com/0F0fQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0F0fQ.png" alt="enter image description here" /></a>
  why are the dots so scattered?</li>
  </ol>
  <p>If I use random forest to find out important variables I get this:
  <a href="https://i.stack.imgur.com/jKqi3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jKqi3.png" alt="enter image description here" /></a></p>
  <p>For me is importanr to build a linear model. I want to compare it with more complex models xgboost, lasso and other</p>