# Choice Modeling - Diagnostic - Experimental Design - Parameter Standard Errors of Design extension

Create an output containing the parameter fits and their standard errors for the design

Calculates the parameter fits and their standard errors for a Choice Modeling - Experimental Designchoice model experimental design output.

## Technical Details

Random responses are created for 300 respondents for the experimental design and the resulting data is fit with a multinomial logit model. The D-error is also calculated.

## Example

Random design

Complete enumeration design

The values are generally compared between designs created by different algorithms for the same specification, rather than assessed on an individual basis.

For the examples above, the Random design has higher standard errors and d-error compared to the Complete enumeration design.

The parameter estimates from the logit model can general be ignored and are non-zero because of randomness.

## References

Hoare, J. (2018, July 20). How Good is your Choice Model Experimental Design? [Blog post]. Accessed from https://www.displayr.com/how-good-is-your-choice-model-experimental-design/.

For details of the D-error calculation see

1. Yap, J. (2018, August 20). What is D-Error? [Blog post]. Accessed from https://www.displayr.com/what-is-d-error/.
2. Yap, J. (2018, August 21). How to Compute D-error for a Choice Experiment [Blog post]. Accessed from https://www.displayr.com/how-to-compute-d-error-for-a-choice-experiment/.
3. Huber, J., & Zwerina, K. (1996). The importance of utility balance in efficient choice designs. Journal of Marketing research, 307-317. Accessed from https://faculty.fuqua.duke.edu/~jch8/bio/Papers/Huber%20Zwerina%201996%20Marketing%20Research.pdf.

## Code

```includeWeb("QScript R Output Functions");

var is_displayr = (!!Q.isOnTheWeb && Q.isOnTheWeb());
if (!is_displayr)
{
if (Q.fileFormatVersion() >= 17.13)
main();
else
alert("Please update Q to use this feature from the extension button, or run it from the menu via Automate > Browse Online Library > Choice Modeling > Diagnostic > Experimental Design > Standard Errors.");
}
else
{
main();
}

function main() {

// The following 2 variables contain information specific to this diagnostic.
var required_class = "ChoiceModelDesign";
var output_name_suffix = "standard.errors";

var item = checkSelectedItemClass(required_class);
if (item == null)
return false;
var r_name = stringToRName(item.referenceName);

// The following lines contain the R code to run
var expression = "list(standard.errors = " + r_name + "\$standard.errors," +
"d.error = " + r_name + "\$d.error)";

return createROutput(item, expression, output_name_suffix);
}
```