hi there, when I was running the estimateBLP, it gives the following error message:
Error in .prepare_theta2(par_theta2, final_col_names_par = c("unobs_sd", : Colnames of par_theta2 do not match with names of obs. and unobs. heterogeneity. Remember to name column of unobs. heterogeneity "unobs_sd" .
But I am pretty sure that I have named the first column of my par_theta2 matrix with "unobs_sd", I do not know what is wrong with my code; I will paste my code down here, could someone offer some help? Thanks a lot.
colnames(theta_guesses) <- c("unobs_sd", "area"); # there is only one demo variable "area"
rownames(theta_guesses) <- c("price", "mixed", "toxicity_dummy1","toxicity_dummy2");
hi there, when I was running the estimateBLP, it gives the following error message: Error in .prepare_theta2(par_theta2, final_col_names_par = c("unobs_sd", : Colnames of par_theta2 do not match with names of obs. and unobs. heterogeneity. Remember to name column of unobs. heterogeneity "unobs_sd" .
But I am pretty sure that I have named the first column of my par_theta2 matrix with "unobs_sd", I do not know what is wrong with my code; I will paste my code down here, could someone offer some help? Thanks a lot.
model_test <- as.formula("share ~ price + mixed + toxicity_dummy1 + toxicity_dummy2| mixed + toxicity_dummy1 + toxicity_dummy2| 0 + price + mixed + toxicity_dummy1 + toxicity_dummy2| IV_price_b_1 +IV_price_b_2+IV_price_b_3+IV_price_b_4+ IV_price_b_5+IV_price_b_6+IV_price_b_7");
theta_guesses <- matrix(c( 0.05,0.49, 0.004, 0.49, 0.004, 0.49, 0.004, 0.49), nrow = 4, byrow = TRUE);
colnames(theta_guesses) <- c("unobs_sd", "area"); # there is only one demo variable "area" rownames(theta_guesses) <- c("price", "mixed", "toxicity_dummy1","toxicity_dummy2");
blp_data <- BLP_data(model = model_test, market_identifier="mkt_id", product_id = "good_id", productData = dataset, demographic_draws = demodata_list, integration_method = "MLHS" , integration_accuracy = 50, integration_seed = 3, blp_inner_tol = 1e-16, blp_inner_maxit = 10000) my_est_test <- estimateBLP(blp_data = blp_data, par_theta2 = theta_guesses, extremumCheck = TRUE , printLevel = 1 , solver_method = "BFGS", solver_maxit = 10000, standardError = "homoskedastic") summary(my_est_test)