I want to create a regression tree from a dataset that has predictors of continuous and categorical variables. For ex: to predict the profit of a company based on State(categorical) & Total Amount invested in R&D(Continuous). My question is how will the algorithm decide which variable to pick first as its root node? What technique is used to select the categorigal and continuos variable.
Different algorithms use different methods to figure out the best split at each node, including the root. The goal is to create nodes that are as "good" as possible, but the exact definition of "good" can vary. So, you have to look in the documentation of the software you are using. Many software packages allow the user considerable choice in determining the splits.