first_stage | R Documentation |
Estimates the first stage of a sorting model
first_stage(code_name, Z_names, X_names, data, print_detail = 3)
code_name |
Indicates (with name or column number) the vector with alternative chosen |
Z_names |
Indicates (with names or column numbers) the vectors with individual data |
X_names |
Indicates (with names or column numbers) the vectors with alternative data |
data |
Dataset to be used |
print_detail |
Controls the output detail of maxLik (default is set at 3) |
Optimization occurs via the maxLik package for an obtimization of a conditional logit model
A (maxLik) object with the estimates (maxLik) together with the indicators of the alternative chosen, the vectors with individual data, the vectors with city/regional data and the name of the reference alternative
code_name <- c("mun_code") Z_names <- c("age","income") X_names <- c("lnprice","nature","monuments") data <- municipality s1.results <- first_stage(code_name, Z_names, X_names, data, print_detail = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.