{"size":{"Width":576,"Height":488},"appearance":{"background":null,"padding":14,"font":{"family":"Courier New","size":10.0,"bold":false,"italic":false,"underline":false,"strikeout":false,"color":"rgb(0,72,168)"},"border":{"on":true,"size":0.0,"style":"solid","color":"#666"},"text":{"wrap":false,"hAlign":"left","vAlign":"top"}},"outputType":"WIDGET","widgetState":null,"outputs":{"console":"<pre class='debug-source'>>library(flipMaxDiff)\n</pre>\n<pre class='debug-message'>Loading required package: Rcpp\n</pre>\n<pre class='debug-source'>>df <- if (exists("formCovariates")) {\n names(formCovariates) <- sapply(formCovariates, function(x) attr(x, "label"))\n data.frame(formCovariates)\n} else\n NULL\n</pre>\n<pre class='debug-source'>> \n</pre>\n<pre class='debug-source'>>max.diff <- FitMaxDiff(design = if(exists("formDesign")) formDesign else if (exists("formURL")) read.csv(formURL),\n version = if (is.null(formVersion)) rep(1, length(formBest[[1]])) else formVersion,\n best = if (exists("formBest")) data.frame(formBest),\n worst = if (exists("formWorst")) data.frame(formWorst),\n design.alternatives = data.frame(formAlternatives),\n design.version = formDesignVersion,\n alternative.names = if (formNames != "") formNames else NULL,\n n.classes = if(exists("formClasses")) formClasses else 1,\n subset = if (all(QFilter)) NULL else QFilter,\n weights = QPopulationWeight,\n characteristics = df,\n lc = if (exists("formLC")) formLC else TRUE,\n output = if (formType == "Varying coefficients") "Probabilities" else "Parameters",\n tasks.left.out = formCV,\n is.tricked = if(exists("formModel")) formModel == "Tricked logit" else TRUE,\n algorithm = if (formType == "Hierarchical Bayes") "HB-Stan" else "Default",\n hb.iterations = if(exists("formIterations")) formIterations else 0,\n hb.chains = if(exists("formChains")) formChains else 0,\n hb.max.tree.depth = if(exists("formMaxTreeDepth")) formMaxTreeDepth else 0)\n</pre>\r\n<div class=\"debug-summarystatistics\"><table>\r\n<tr><th>Started:</th><td class=utc-time>2018-11-16T05:06:50.093Z</td></tr>\r\n<tr><th>Finished:</th><td class=utc-time>2018-11-16T05:08:00.093Z</td></tr>\r\n<tr><th>Total time:</th><td>1m 10.99s</td></tr>\r\n<tr><th>Time executing code:</th><td title=\"0.08s\">1m 10.91s</td></tr>\r\n<tr><th>Other overhead on R server:</th><td>1m 10.10s</td></tr>\r\n<tr><th>Time spent transferring data:</th><td>0.08s</td></tr>\r\n<tr><th>Data sent to R server:</th><td>11.9KB</td></tr>\r\n<tr><th>Data received from R server:</th><td>612KB</td></tr>\r\n</table></div>","message":"Loading required package: Rcpp\n","htmlwidgets":"<div id=\"htmlwidget_container\">\n <div id=\"htmlwidget-876bd71d99ecf8d22eff\" class=\"formattable_widget html-widget\" style=\"width:100%;height:500px;\" width=\"100%\" height=\"500\"></div>\n</div>\n<script type=\"application/json\" data-for=\"htmlwidget-876bd71d99ecf8d22eff\">{\"x\":{\"html\":\"<table class = \\\"table table-condensed\\\"style = \\\"margin:0; border-bottom: 2px solid; border-top: 2px solid; font-size:90%;\\\">\\n<h3 class=\\\".h3\\\" style=\\\"color:#3E7DCC; text-align:left; margin-top:0px; margin-bottom:0\\\">MaxDiff: Hierarchical Bayes<\\/h3>\\n<h5 class=\\\".h5\\\" style=\\\"color:#888888; text-align:left; margin-top:5px; margin-bottom:0\\\">In-sample accuracy: 93.3%; mean RLH: 0.63<\\/h5>\\n<caption style=\\\"caption-side:bottom;font-style:italic; font-size:90%;\\\"><p style='margin-bottom:5px;'>n = 302 cases used in estimation; number of questions: 6; number of alternatives: 10; alternatives per question: 5; <\\/p><p style='margin-bottom:5px;'>accuracy: 93.3%; mean RLH: 0.63; g.mean RLH: 0.60; certainty: 68%; log-likelihood: -1,854; BIC: 4,015; <\\/p><p style='margin-bottom:5px;'>lowest effective sample size (Mean): 31.6 at Yahoo; highest Rhat (Mean): 1.1 at Samsung; lowest effective sample size (St. Dev.): 24.9 at Yahoo; highest Rhat (St. Dev.): 1.2 at Yahoo; time taken to run analysis: 1 minute and 5 seconds; column width: 0.48; <\\/p><\\/caption>\\n <thead>\\n <tr>\\n <th style=\\\"text-align:left;\\\"> <\\/th>\\n <th style=\\\"text-align:center;\\\"> Respondent Coefficients <\\/th>\\n <th style=\\\"text-align:right;\\\"> Mean <\\/th>\\n <th style=\\\"text-align:right;\\\"> Standard Deviation <\\/th>\\n <\\/tr>\\n <\\/thead>\\n<tbody>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Apple <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-52bd026db2a8d5e07b04\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-52bd026db2a8d5e07b04\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.3],[0,2.6],[0,4],[0,2],[0,2],[0,0.3],[0,0],[0,0],[0,0.3],[0,1],[0,1],[0,1.3],[0,2.3],[0,0.3],[0,0.7],[0,1.7],[0,0.3],[0,1.7],[0,6.3],[0,5],[3,0],[0.3,0],[0.7,0],[5.3,0],[3.3,0],[2.3,0],[0.7,0],[1.3,0],[4.6,0],[5.6,0],[1.7,0],[1.7,0],[0.3,0],[0,0],[0,0],[0.3,0],[0.3,0],[0.7,0],[5,0],[9.6,0],[7.3,0],[5.3,0],[3.6,0],[3,0],[1,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 3.2 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 6.2 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Microsoft <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-948140af9bb8d3e1a44b\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-948140af9bb8d3e1a44b\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.7],[0,1.7],[0,1],[0,0.3],[0,1],[0,1.3],[0,1.7],[0,2.6],[0,3.6],[0,2],[0,0.7],[0,6.3],[13.9,0],[13.2,0],[7.6,0],[7.3,0],[5.6,0],[7,0],[4,0],[5.3,0],[5,0],[2.6,0],[1.3,0],[2.3,0],[1,0],[0.7,0],[0.3,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 1.1 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.4 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> IBM <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-bffc2fbe164e19b324e1\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-bffc2fbe164e19b324e1\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.3],[0,2.3],[0,5],[0,2.6],[0,7.9],[0,6.3],[0,10.9],[0,9.3],[0,4.3],[0,5],[0,8.6],[0,15.2],[0,10.9],[0,2.6],[1.7,0],[2.6,0],[2.6,0],[0.7,0],[0.3,0],[0.7,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> -2.4 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 1.9 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Google <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-904d9ad7c7d4295ebf09\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-904d9ad7c7d4295ebf09\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.3],[0,0.3],[0,0],[0,1.7],[0,0.3],[0,1.7],[0,1],[0,0.7],[0,2.3],[0,2.6],[11.9,0],[7.3,0],[2.3,0],[6.6,0],[9.3,0],[11.9,0],[3.3,0],[5,0],[5.6,0],[11.6,0],[3,0],[1.7,0],[3.3,0],[5.3,0],[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.5 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.3 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Intel <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-499ecc7a5bd0864e8fb3\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-499ecc7a5bd0864e8fb3\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.3],[0,0.3],[0,2.3],[0,3],[0,3],[0,6.3],[0,5],[0,10.3],[0,8.9],[0,16.6],[0,10.9],[0,11.3],[6.6,0],[7,0],[3,0],[1,0],[1.7,0],[0.3,0],[0,0],[1,0],[0.3,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> -1.2 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 1.6 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Samsung <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-62f221b38ccb20f95d4f\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-62f221b38ccb20f95d4f\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1],[0,1.7],[0,2],[0,0.7],[0,0.3],[0,0.7],[0,0.7],[0,1.7],[0,1.3],[0,2.3],[0,0.7],[0,2.6],[0,0.3],[0,3],[0,12.3],[12.6,0],[3.3,0],[1.7,0],[2.3,0],[6.3,0],[5.6,0],[1.7,0],[1,0],[3.6,0],[4,0],[5.3,0],[2,0],[0.7,0],[2,0],[3,0],[5,0],[6,0],[3,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.0 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 3.8 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Sony <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-0a620eadb519adaf9687\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-0a620eadb519adaf9687\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.7],[0,0],[0,0.7],[0,0.3],[0,0.3],[0,1],[0,1.7],[0,2],[0,4.3],[0,3.3],[0,1.7],[0,9.6],[0,11.9],[11.9,0],[4,0],[4,0],[8.6,0],[9.9,0],[2.6,0],[2.6,0],[6.3,0],[4.6,0],[0.7,0],[1.3,0],[2.6,0],[2.6,0],[0.7,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 1.0 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.4 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Dell <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-f8bd3970d47031f86aac\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-f8bd3970d47031f86aac\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,1.7],[0,3.3],[0,2.6],[0,2],[0,1.7],[0,5.3],[0,3],[0,6.6],[0,6.6],[0,5],[0,5],[0,4.6],[0,8.9],[0,9.9],[0,11.3],[2.6,0],[3,0],[5.6,0],[4,0],[2,0],[1.7,0],[0.7,0],[0.7,0],[0,0],[1,0],[1.3,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> -1.6 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.6 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Yahoo <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-326552b21b282d59fe57\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-326552b21b282d59fe57\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.3],[0,6.6],[0,2.3],[0,6.6],[0,8.9],[0,8.3],[0,12.6],[0,10.6],[0,7.6],[0,14.2],[0,9.9],[0,5.3],[0,0.3],[1.3,0],[0.7,0],[0,0],[1.3,0],[0.7,0],[0,0],[0,0],[0.3,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> -2.8 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 1.7 <\\/td>\\n <\\/tr>\\n <tr>\\n <td style=\\\"vertical-align:middle; text-align:left;\\\"> Nokia <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:center;\\\"> <span id=\\\"htmlwidget-f9ec98e0df8102890d17\\\" class=\\\"sparkline html-widget\\\"><\\/span>\\n<script type=\\\"application/json\\\" data-for=\\\"htmlwidget-f9ec98e0df8102890d17\\\">{\\\"x\\\":{\\\"values\\\":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.7],[0,3],[0,4.6],[0,3],[0,2],[0,3],[0,4.3],[0,4],[0,1.7],[0,6],[0,7.3],[0,6.3],[0,4],[0,4.3],[0,12.6],[0,10.9],[6.3,0],[2.3,0],[2.6,0],[1.7,0],[2,0],[1.3,0],[2,0],[1.7,0],[1,0],[0,0],[1,0],[0,0],[0.7,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],\\\"options\\\":{\\\"type\\\":\\\"bar\\\",\\\"zeroColor\\\":\\\"lightgray\\\",\\\"stackedBarColor\\\":[\\\"#4894F2\\\",\\\"#F95F4A\\\"],\\\"disableInteraction\\\":true,\\\"height\\\":20,\\\"width\\\":300},\\\"width\\\":300,\\\"height\\\":20},\\\"evals\\\":[],\\\"jsHooks\\\":[]}<\\/script> <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> -1.7 <\\/td>\\n <td style=\\\"vertical-align:middle; text-align:right;\\\"> 2.8 <\\/td>\\n <\\/tr>\\n<\\/tbody>\\n<\\/table>\"},\"evals\":[],\"jsHooks\":[]}</script>\n<script type=\"application/htmlwidget-sizing\" data-for=\"htmlwidget-876bd71d99ecf8d22eff\">{\"viewer\":{\"width\":\"100%\",\"height\":350,\"padding\":15,\"fill\":false},\"browser\":{\"width\":\"100%\",\"height\":500,\"padding\":0,\"fill\":false}}</script>","htmlwidget-head":"{\"stylesheets\":[\"https://rserverhtmlwidgetasset.azureedge.net/bootstrap.min-63e52244789ab8f6e3a78818886e7085.css\",\"https://rserverhtmlwidgetasset.azureedge.net/jquery.sparkline-e8ae2db635573e06f005ad840cb82645.css\"],\"javascript\":[\"https://rserverhtmlwidgetasset.azureedge.net/jquery.min-91a24ea414e8c447d647cecab86866c2.js\",\"https://rserverhtmlwidgetasset.azureedge.net/bootstrap.min-326d184c3c13feede563e4adcb5ff2a0.js\",\"https://rserverhtmlwidgetasset.azureedge.net/html5shiv.min-e70767555a95c48c08833356d362ccef.js\",\"https://rserverhtmlwidgetasset.azureedge.net/respond.min-4255ee1a060b15cb2432d0a497a6d510.js\",\"https://rserverhtmlwidgetasset.azureedge.net/htmlwidgets-917a66c6e5036eb1bfd1fb672a82635a.js\",\"https://rserverhtmlwidgetasset.azureedge.net/formattable_widget-d2927ec9dec4a568bd3f4a62041c0ddb.js\",\"https://rserverhtmlwidgetasset.azureedge.net/jquery.sparkline-e81b5fa2faab410df02b65e9c021a795.js\",\"https://rserverhtmlwidgetasset.azureedge.net/sparkline-2c793b2eff7111819a4aacd0cf2e894e.js\"],\"attachments\":[],\"widget-cannot-re-render\":true,\"package\":\"formattable\",\"package_version\":\"0.2.0.2\"}","warning":""},"secondsTaken":70.989328600000007,"updated":"2018-11-16T05:08:00.1093694Z","lastUpdatedMessage":null,"executedCode":"library(flipMaxDiff)\ndf <- if (exists(\"formCovariates\")) {\n names(formCovariates) <- sapply(formCovariates, function(x) attr(x, \"label\"))\n data.frame(formCovariates)\n} else\n NULL\n \nmax.diff <- FitMaxDiff(design = if(exists(\"formDesign\")) formDesign else if (exists(\"formURL\")) read.csv(formURL),\n version = if (is.null(formVersion)) rep(1, length(formBest[[1]])) else formVersion,\n best = if (exists(\"formBest\")) data.frame(formBest),\n worst = if (exists(\"formWorst\")) data.frame(formWorst),\n design.alternatives = data.frame(formAlternatives),\n design.version = formDesignVersion,\n alternative.names = if (formNames != \"\") formNames else NULL,\n n.classes = if(exists(\"formClasses\")) formClasses else 1,\n subset = if (all(QFilter)) NULL else QFilter,\n weights = QPopulationWeight,\n characteristics = df,\n lc = if (exists(\"formLC\")) formLC else TRUE,\n output = if (formType == \"Varying coefficients\") \"Probabilities\" else \"Parameters\",\n tasks.left.out = formCV,\n is.tricked = if(exists(\"formModel\")) formModel == \"Tricked logit\" else TRUE,\n algorithm = if (formType == \"Hierarchical Bayes\") \"HB-Stan\" else \"Default\",\n hb.iterations = if(exists(\"formIterations\")) formIterations else 0,\n hb.chains = if(exists(\"formChains\")) formChains else 0,\n hb.max.tree.depth = if(exists(\"formMaxTreeDepth\")) formMaxTreeDepth else 0)","lastSavedCode":"library(flipMaxDiff)\ndf <- if (exists(\"formCovariates\")) {\n names(formCovariates) <- sapply(formCovariates, function(x) attr(x, \"label\"))\n data.frame(formCovariates)\n} else\n NULL\n \nmax.diff <- FitMaxDiff(design = if(exists(\"formDesign\")) formDesign else if (exists(\"formURL\")) read.csv(formURL),\n version = if (is.null(formVersion)) rep(1, length(formBest[[1]])) else formVersion,\n best = if (exists(\"formBest\")) data.frame(formBest),\n worst = if (exists(\"formWorst\")) data.frame(formWorst),\n design.alternatives = data.frame(formAlternatives),\n design.version = formDesignVersion,\n alternative.names = if (formNames != \"\") formNames else NULL,\n n.classes = if(exists(\"formClasses\")) formClasses else 1,\n subset = if (all(QFilter)) NULL else QFilter,\n weights = QPopulationWeight,\n characteristics = df,\n lc = if (exists(\"formLC\")) formLC else TRUE,\n output = if (formType == \"Varying coefficients\") \"Probabilities\" else \"Parameters\",\n tasks.left.out = formCV,\n is.tricked = if(exists(\"formModel\")) formModel == \"Tricked logit\" else TRUE,\n algorithm = if (formType == \"Hierarchical Bayes\") \"HB-Stan\" else \"Default\",\n hb.iterations = if(exists(\"formIterations\")) formIterations else 0,\n hb.chains = if(exists(\"formChains\")) formChains else 0,\n hb.max.tree.depth = if(exists(\"formMaxTreeDepth\")) formMaxTreeDepth else 0)","highlightedCodeSpans":[{"start":295,"length":7,"index":4},{"start":331,"length":11,"index":4},{"start":360,"length":8,"index":4},{"start":381,"length":11,"index":4},{"start":440,"length":8,"index":4},{"start":499,"length":9,"index":4},{"start":635,"length":9,"index":4},{"start":652,"length":9,"index":4},{"start":715,"length":11,"index":4},{"start":756,"length":7,"index":6},{"start":776,"length":7,"index":6},{"start":799,"length":17,"index":6},{"start":910,"length":8,"index":4},{"start":1002,"length":6,"index":4},{"start":1051,"length":9,"index":4},{"start":1111,"length":8,"index":4},{"start":1220,"length":14,"index":4},{"start":1284,"length":10,"index":4},{"start":1358,"length":16,"index":4}],"tableTransformations":"<TabularTransformer>\r\n <TabularTransform type=\"Truncation\" truncationHeaderType=\"Column\" />\r\n <TabularTransform />\r\n</TabularTransformer>","tabularFilteringOptions":null,"hasGuiControls":true,"guiControls":{"Code":"var allow_control_groups = Q.fileFormatVersion() > 10.9; // Group controls for Displayr and later versions of Q\n\nif (allow_control_groups)\n form.group(\"Experimental design\")\n\nvar dt = form.comboBox({name: \"formDesignLocation\", label: \"Design location\", alternatives: [\"Use an existing table\", \"Variables\", \"Provide a URL\"], default_value: \"Use an existing table\"});\nif (dt.getValue() == \"Use an existing table\")\n form.dropBox({name: \"formDesign\", label: \"Design\", types: [\"Table\", \"RItem:matrix,array,data.frame,table,list\"], required: true});\nelse if (dt.getValue() == \"Variables\")\n{\n form.dropBox({label: \"Alternatives\",\n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"],\n name: \"formAlternatives\", required: true, multi: true});\n form.dropBox({label: allow_control_groups ? \"Design version\" : \"Experimental design version\",\n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"],\n name: \"formDesignVersion\", required: false});\n}\nelse\n form.textBox({name: \"formURL\", label: \"Design URL\", required: true});\n\nif (allow_control_groups)\n form.group(\"Respondent data\")\n\nform.dropBox({label: allow_control_groups ? \"Version\" : \"Version variable\",\n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"],\n name: \"formVersion\", required: false});\nform.dropBox({label: \"Best selections\", \n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"], \n name: \"formBest\", multi: true});\nform.dropBox({label: \"Worst selections\", \n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"], \n name: \"formWorst\", multi: true});\nform.textBox({name: \"formNames\", label: \"Alternative names\", required: false, prompt: \"For example: Coke, Diet Coke, Pepsi\"});\n\nif (allow_control_groups)\n form.group(\"Model\")\nvar type = form.comboBox({name: \"formType\", label: \"Type\", alternatives: [\"Latent class analysis\", \"Varying coefficients\", \"Hierarchical Bayes\"], default_value: \"Hierarchical Bayes\"});\nvar is_lc = type.getValue() == \"Latent class analysis\";\nvar is_vc = type.getValue() == \"Varying coefficients\";\nvar is_hb = type.getValue() == \"Hierarchical Bayes\";\n\nvar web_mode = (!!Q.isOnTheWeb && Q.isOnTheWeb());\nif (is_hb && Q.fileFormatVersion() < 12.31 && !web_mode)\n alert(\"A newer version of Q (version 5.3) is required to run Hierarchical Bayes. Please contact support@q-researchsoftware.com to upgrade.\");\n\nif (is_lc)\n form.setHeading(\"MaxDiff - \" + \"Latent Class Analysis\");\nelse if (is_vc)\n form.setHeading(\"MaxDiff - \" + \"Varying Coefficients\");\nelse if (is_hb)\n form.setHeading(\"MaxDiff - \" + \"Hierarchical Bayes\");\nif (is_vc)\n{\n form.dropBox({label: \"Covariates\",\n types:[\"Variable: Numeric, Categorical, OrderedCategorical\"], \n name: \"formCovariates\", multi: true, required: true});\n var lc = form.checkBox({label: \"Additional latent class analysis\", name: \"formLC\", default_value: true});\n}\nif (is_lc || (is_vc && lc.getValue()) || is_hb)\n form.numericUpDown({name: \"formClasses\", label: \"Number of classes\", default_value: 1, increment: 1, maximum:100, minimum: 1});\nform.comboBox({label: \"MaxDiff model\", alternatives: [\"Tricked logit\", \"Rank-ordered logit with ties\"], name: \"formModel\", default_value: \"Tricked logit\"});\nform.numericUpDown({name: \"formCV\", label: \"Questions left out for cross-validation\", default_value: 0, increment: 1, maximum:100, minimum: 0});\nif (is_hb)\n{\n form.numericUpDown({name: \"formIterations\", label: \"Iterations\", default_value: 100, increment: 10, maximum:1000000, minimum: 1});\n form.numericUpDown({name: \"formChains\", label: \"Chains\", default_value: 8, increment: 1, maximum:1000, minimum: 1});\n form.numericUpDown({name: \"formMaxTreeDepth\", label: \"Maximum tree depth\", default_value: 10, increment: 1, maximum:1000, minimum: 1});\n}","JSError":null,"JSErrorDetails":null,"ControlDefinitionErrors":null,"InputValidationErrors":null,"Controls":[{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":null,"Page":null,"Group":null,"Type":"Heading","Label":null,"LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":"MaxDiff - Hierarchical Bayes","Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formDesignLocation","Page":null,"Group":"Experimental design","Type":"ComboBox","Label":"Design location","LabelEmphasised":false,"Value":"Provide a URL","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Use an existing table","Variables","Provide a URL"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formURL","Page":null,"Group":"Experimental design","Type":"TextBox","Label":"Design URL","LabelEmphasised":false,"Value":"http://wiki.q-researchsoftware.com/images/7/78/Technology_MaxDiff_Design.csv","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formVersion","Page":null,"Group":"Respondent data","Type":"DropBox","Label":"Version","LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":"Select an input which is of type Variable (Numeric, Categorical or Orderedcategorical).","ErrorMessage":"Version: Version accepts only one input which is of type Variable (Numeric, Categorical or Orderedcategorical).","Invalid":null,"Required":false,"AllowedTypes":["Variable: Numeric, Categorical, OrderedCategorical"],"OwnerRItemGuid":"cf050579-59ef-442d-a2b3-b8448853d3c1","MinInputs":0,"MaxInputs":1,"Height":1,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formBest","Page":null,"Group":"Respondent data","Type":"DropBox","Label":"Best selections","LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":true,"Prompt":"Select at least one input which is of type Variable (Numeric, Categorical or Orderedcategorical).","ErrorMessage":"Best selections: Best selections accepts only inputs which are of type Variable (Numeric, Categorical or Orderedcategorical).","Invalid":null,"Required":true,"AllowedTypes":["Variable: Numeric, Categorical, OrderedCategorical"],"OwnerRItemGuid":"cf050579-59ef-442d-a2b3-b8448853d3c1","MinInputs":1,"MaxInputs":2147483647,"Height":4,"Duplicates":false,"Values":["7f938d82-c2ba-4531-a3bb-03c30752368a","76e7bd6b-d5e6-4839-a2e5-f22a79846551","add729f3-3a3b-4c78-93fa-d40a913d2ea4","b277ce8c-7206-4c58-8ed9-bb518d8bea99","dcac1dd5-0348-47fc-9518-87cdbd58fd42","c3bb22a1-6825-407b-a4d6-b341cea55abf"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formWorst","Page":null,"Group":"Respondent data","Type":"DropBox","Label":"Worst selections","LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":true,"Prompt":"Select at least one input which is of type Variable (Numeric, Categorical or Orderedcategorical).","ErrorMessage":"Worst selections: Worst selections accepts only inputs which are of type Variable (Numeric, Categorical or Orderedcategorical).","Invalid":null,"Required":true,"AllowedTypes":["Variable: Numeric, Categorical, OrderedCategorical"],"OwnerRItemGuid":"cf050579-59ef-442d-a2b3-b8448853d3c1","MinInputs":1,"MaxInputs":2147483647,"Height":4,"Duplicates":false,"Values":["273d58a3-0037-47f4-a97c-f8699dc05cc2","9f3027ce-6e0b-4e63-a76f-b5d0361dc67d","22bd7cf2-4ab2-4da6-834c-ecab98fe2463","eb059d18-9583-4439-90fc-e4a5d4757ece","cd3070b2-1617-45fd-a060-e859b8a5081a","e50271e1-ca05-4c0c-bd6e-4af8aea2b7d9"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formNames","Page":null,"Group":"Respondent data","Type":"TextBox","Label":"Alternative names","LabelEmphasised":false,"Value":"","Allowed":null,"Multi":false,"Prompt":"For example: Coke, Diet Coke, Pepsi","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formType","Page":null,"Group":"Model","Type":"ComboBox","Label":"Type","LabelEmphasised":false,"Value":"Hierarchical Bayes","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Latent class analysis","Varying coefficients","Hierarchical Bayes"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formClasses","Page":null,"Group":"Model","Type":"NumericUpDown","Label":"Number of classes","LabelEmphasised":false,"Value":1.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Number of classes: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":1.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formModel","Page":null,"Group":"Model","Type":"ComboBox","Label":"MaxDiff model","LabelEmphasised":false,"Value":"Tricked logit","Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Tricked logit","Rank-ordered logit with ties"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formCV","Page":null,"Group":"Model","Type":"NumericUpDown","Label":"Questions left out for cross-validation","LabelEmphasised":false,"Value":0.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Questions left out for cross-validation: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":0.0,"Max":100.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formIterations","Page":null,"Group":"Model","Type":"NumericUpDown","Label":"Iterations","LabelEmphasised":false,"Value":100.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Iterations: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":10.0,"Min":1.0,"Max":1000000.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formChains","Page":null,"Group":"Model","Type":"NumericUpDown","Label":"Chains","LabelEmphasised":false,"Value":8.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Chains: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":1.0,"Max":1000.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formMaxTreeDepth","Page":null,"Group":"Model","Type":"NumericUpDown","Label":"Maximum tree depth","LabelEmphasised":false,"Value":10.0,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":"Maximum tree depth: ","Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":1.0,"Min":1.0,"Max":1000.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":null,"Page":null,"Group":null,"Type":null,"Label":null,"LabelEmphasised":false,"Value":null,"Allowed":null,"Multi":false,"Prompt":null,"ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":true}]},"calculating":"Idle","showDebug":false,"layout":"OutputOnly","vSplit":0.25,"hSplit":0.45,"updateWarnings":true,"updateMode":"Manual","warnSlow":false,"Options":{"debugconsole":false,"codeposition":"OutputOnly","splitH":0.45,"splitV":0.25,"update warnings":true,"updating":"Manual","warn slow":false}}