{"size":{"Width":491,"Height":181},"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(flipFormat)\n</pre>\n<pre class='debug-source'>>library(flipTransformations)\n</pre>\n<pre class='debug-source'>>data <- AsNumeric(ProcessQVariables(data.frame(q24c.wdh)), binary = FALSE)\n</pre>\n<pre class='debug-source'>>if (!is.null(QCalibratedWeight))\n data <- data.frame(AdjustDataToReflectWeights(data, QCalibratedWeight))\n</pre>\n<pre class='debug-source'>>Variable <- data[QFilter, 1]\n</pre>\n<pre class='debug-source'>>\n</pre>\n<pre class='debug-source'>>test.output <- wilcox.test(Variable, \n mu = as.numeric(formMu),\n alternative = switch(hypothesis, "Two-sided" = "two.sided", "Median < 0" = "less", "Median > 0" = "greater"), \n exact = switch(type, "Default" = NULL, "Exact" = TRUE, "Normal approximation" = FALSE, "Normal approximation with continuity correction" = FALSE), \n correct = switch(type, "Default" = TRUE, "Exact" = FALSE, "Normal approximation" = FALSE, "Normal approximation with continuity correction" = TRUE))\n</pre>\n<pre class='debug-source'>>single.sample.wilcoxon <- if (formOutput == "Summary") {\n decimal.places <- if (formDecimals) 8 else NULL\n SignificanceTest(test.output, "Single-Sample Wilcoxon Test",\n list(formOutcomeVariable),\n filter = QFilter, weight = QCalibratedWeight,\n p.value.method = type,\n show.labels = !formNames, decimal.places = decimal.places,\n resample = TRUE)\n} else\n test.output\n</pre>\r\n<div class=\"debug-summarystatistics\"><table>\r\n<tr><th>Started:</th><td class=utc-time>2018-08-29T04:27:53.319Z</td></tr>\r\n<tr><th>Finished:</th><td class=utc-time>2018-08-29T04:27:53.319Z</td></tr>\r\n<tr><th>Total time:</th><td>0.64s</td></tr>\r\n<tr><th>Time executing code:</th><td title=\"0.04s\">0.60s</td></tr>\r\n<tr><th>Other overhead on R server:</th><td>0.43s</td></tr>\r\n<tr><th>Time spent transferring data:</th><td>0.04s</td></tr>\r\n<tr><th>Data sent to R server:</th><td>8.4KB</td></tr>\r\n<tr><th>Data received from R server:</th><td>6.9KB</td></tr>\r\n</table></div>","htmlwidgets":"<div id=\"htmlwidget_container\">\n <div id=\"htmlwidget-86fddc4e6f435fac0655\" 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-86fddc4e6f435fac0655\">{\"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\\\">Single-Sample Wilcoxon Test<\\/h3>\\n<h4 class=\\\".h4\\\" style=\\\"color:#3E7DCC; text-align:left; margin-top:5px; margin-bottom:0\\\">Significant: p-value < 0.000000000001<\\/h4>\\n<h5 class=\\\".h5\\\" style=\\\"color:#888888; text-align:left; margin-top:5px; margin-bottom:0\\\">Hours spent watching TV - weekdays<\\/h5>\\n<caption style=\\\"caption-side:bottom;font-style:italic; font-size:90%;\\\">n = 697 cases used in estimation of a total sample size of 725; cases containing missing values have been excluded; null hypothesis: true location shift is less than 1;<\\/caption>\\n <thead>\\n <tr>\\n <th style=\\\"text-align:right;\\\"> V <\\/th>\\n <th style=\\\"text-align:right;\\\"> p-value <\\/th>\\n <\\/tr>\\n <\\/thead>\\n<tbody>\\n <tr>\\n <td style=\\\"text-align:right;\\\"> 95,371.00 <\\/td>\\n <td style=\\\"text-align:right;\\\"> < 0.000000000001 <\\/td>\\n <\\/tr>\\n<\\/tbody>\\n<\\/table>\"},\"evals\":[],\"jsHooks\":[]}</script>\n<script type=\"application/htmlwidget-sizing\" data-for=\"htmlwidget-86fddc4e6f435fac0655\">{\"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\"],\"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\"],\"attachments\":[],\"widget-cannot-re-render\":true}","message":"","warning":""},"secondsTaken":0.6351687,"updated":"2018-08-29T04:27:53.319504Z","lastUpdatedMessage":null,"executedCode":"library(flipFormat)\nlibrary(flipTransformations)\ndata <- AsNumeric(ProcessQVariables(data.frame(q24c.wdh)), binary = FALSE)\nif (!is.null(QCalibratedWeight))\n data <- data.frame(AdjustDataToReflectWeights(data, QCalibratedWeight))\nVariable <- data[QFilter, 1]\n\ntest.output <- wilcox.test(Variable, \n mu = as.numeric(formMu),\n alternative = switch(hypothesis, \"Two-sided\" = \"two.sided\", \"Median < 0\" = \"less\", \"Median > 0\" = \"greater\"), \n exact = switch(type, \"Default\" = NULL, \"Exact\" = TRUE, \"Normal approximation\" = FALSE, \"Normal approximation with continuity correction\" = FALSE), \n correct = switch(type, \"Default\" = TRUE, \"Exact\" = FALSE, \"Normal approximation\" = FALSE, \"Normal approximation with continuity correction\" = TRUE))\nsingle.sample.wilcoxon <- if (formOutput == \"Summary\") {\n decimal.places <- if (formDecimals) 8 else NULL\n SignificanceTest(test.output, \"Single-Sample Wilcoxon Test\",\n list(formOutcomeVariable),\n filter = QFilter, weight = QCalibratedWeight,\n p.value.method = type,\n show.labels = !formNames, decimal.places = decimal.places,\n resample = TRUE)\n} else\n test.output","lastSavedCode":"library(flipFormat)\nlibrary(flipTransformations)\ndata <- AsNumeric(ProcessQVariables(data.frame(q24c.wdh)), binary = FALSE)\nif (!is.null(QCalibratedWeight))\n data <- data.frame(AdjustDataToReflectWeights(data, QCalibratedWeight))\nVariable <- data[QFilter, 1]\n\ntest.output <- wilcox.test(Variable, \n mu = as.numeric(formMu),\n alternative = switch(hypothesis, \"Two-sided\" = \"two.sided\", \"Median < 0\" = \"less\", \"Median > 0\" = \"greater\"), \n exact = switch(type, \"Default\" = NULL, \"Exact\" = TRUE, \"Normal approximation\" = FALSE, \"Normal approximation with continuity correction\" = FALSE), \n correct = switch(type, \"Default\" = TRUE, \"Exact\" = FALSE, \"Normal approximation\" = FALSE, \"Normal approximation with continuity correction\" = TRUE))\nsingle.sample.wilcoxon <- if (formOutput == \"Summary\") {\n decimal.places <- if (formDecimals) 8 else NULL\n SignificanceTest(test.output, \"Single-Sample Wilcoxon Test\",\n list(formOutcomeVariable),\n filter = QFilter, weight = QCalibratedWeight,\n p.value.method = type,\n show.labels = !formNames, decimal.places = decimal.places,\n resample = TRUE)\n} else\n test.output","highlightedCodeSpans":[{"start":96,"length":8,"index":0},{"start":137,"length":17,"index":6},{"start":213,"length":17,"index":6},{"start":250,"length":7,"index":6},{"start":321,"length":6,"index":4},{"start":355,"length":10,"index":4},{"start":464,"length":4,"index":4},{"start":618,"length":4,"index":4},{"start":780,"length":10,"index":4},{"start":833,"length":12,"index":4},{"start":950,"length":19,"index":4},{"start":1002,"length":7,"index":6},{"start":1020,"length":17,"index":6},{"start":1077,"length":4,"index":4},{"start":1119,"length":9,"index":4}],"tableTransformations":"<TabularTransformer>\r\n <TabularTransform type=\"Truncation\" truncationHeaderType=\"Column\" />\r\n <TabularTransform />\r\n</TabularTransformer>","tabularFilteringOptions":null,"hasGuiControls":true,"guiControls":{"Code":"form.setHeading(\"Single-Sample Wilcoxon Test\");\nform.dropBox({label: \"Variable\",\n types:[\"Variable: Numeric, Date, Money, Categorical, OrderedCategorical\"],\n name: \"formOutcomeVariable\", prompt: \"Select the Variable containing the sample\"});\nform.textBox({label: \"Null hypothesis: mu =\", default_value: \"0\", name: \"formMu\", type: \"number\",\n prompt: \"Median of the variable, assumed under the null hypothesis\"});\nform.comboBox({label: \"Alternative hypothesis\", alternatives: [\"Two-sided\", \"Median < 0\", \"Median > 0\"],\n default_value: \"Two-sided\", name: \"hypothesis\", prompt: \"Choose between a one-sided and two-sided test\"});\nform.comboBox({label: \"Type of test\", alternatives: [\"Default\", \"Exact\", \"Normal approximation\", \"Normal approximation with continuity correction\"],\n name: \"type\", default_value: \"Default\", prompt: \"Method by which the p-value is computed\"});\nvar formOutput = form.comboBox({label: \"Output\", alternatives: [\"Summary\", \"R\"], \n name: \"formOutput\", default_value: \"Summary\", prompt: \"Select the output type\"});\nif (formOutput.getValue() == \"Summary\")\n{\n form.checkBox({label: \"Variable names\", name: \"formNames\", default_value: false,\n prompt: \"Display names instead of labels\"});\n form.checkBox({label: \"More decimal places\", name: \"formDecimals\", default_value: false,\n prompt: \"Display numeric values with eight decimal places\"});\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":"Single-Sample Wilcoxon Test","Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formOutcomeVariable","Page":null,"Group":null,"Type":"DropBox","Label":"Variable","LabelEmphasised":false,"Value":"3277015f-e3d0-41fa-9520-328bc31edc12","Allowed":null,"Multi":false,"Prompt":"Select the Variable containing the sample","ErrorMessage":"Variable: Variable accepts only one input which is of type Variable (Numeric, Date, Money, Categorical or Orderedcategorical).","Invalid":null,"Required":true,"AllowedTypes":["Variable: Numeric, Date, Money, Categorical, OrderedCategorical"],"OwnerRItemGuid":"48eb8b65-ad6a-4bfc-92bb-544df0589bf6","MinInputs":1,"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":"formMu","Page":null,"Group":null,"Type":"TextBox","Label":"Null hypothesis: mu =","LabelEmphasised":false,"Value":"1","Allowed":null,"Multi":false,"Prompt":"Median of the variable, assumed under the null hypothesis","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":"hypothesis","Page":null,"Group":null,"Type":"ComboBox","Label":"Alternative hypothesis","LabelEmphasised":false,"Value":"Median > 0","Allowed":null,"Multi":false,"Prompt":"Choose between a one-sided and two-sided test","ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Two-sided","Median < 0","Median > 0"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"type","Page":null,"Group":null,"Type":"ComboBox","Label":"Type of test","LabelEmphasised":false,"Value":"Default","Allowed":null,"Multi":false,"Prompt":"Method by which the p-value is computed","ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Default","Exact","Normal approximation","Normal approximation with continuity correction"],"CheckAlign":null,"Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formOutput","Page":null,"Group":null,"Type":"ComboBox","Label":"Output","LabelEmphasised":false,"Value":"Summary","Allowed":null,"Multi":false,"Prompt":"Select the output type","ErrorMessage":null,"Invalid":null,"Required":true,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":["Summary","R"],"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":null,"Type":"CheckBox","Label":"Variable names","LabelEmphasised":false,"Value":false,"Allowed":null,"Multi":false,"Prompt":"Display names instead of labels","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.0,"Vertical":null},{"ItemGuid":"00000000-0000-0000-0000-000000000000","ControlName":"formDecimals","Page":null,"Group":null,"Type":"CheckBox","Label":"More decimal places","LabelEmphasised":false,"Value":false,"Allowed":null,"Multi":false,"Prompt":"Display numeric values with eight decimal places","ErrorMessage":null,"Invalid":null,"Required":false,"AllowedTypes":null,"OwnerRItemGuid":null,"MinInputs":0,"MaxInputs":0,"Height":0,"Duplicates":false,"Values":null,"CheckAlign":"left","Text":null,"Increment":0.0,"Min":0.0,"Max":0.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}}