{"id":438,"date":"2012-09-25T22:06:02","date_gmt":"2012-09-25T20:06:02","guid":{"rendered":"http:\/\/sites.williams.edu\/bklingen\/?page_id=438"},"modified":"2012-10-29T20:07:13","modified_gmt":"2012-10-29T19:07:13","slug":"rcode","status":"publish","type":"page","link":"https:\/\/sites.williams.edu\/bklingen\/research\/poc\/rcode\/","title":{"rendered":"R Code"},"content":{"rendered":"<p><strong>R-code for PoC and dose estimationt under model uncertainty with binary responses in a parallell design <\/strong><\/p>\n<p><strong>For an example, see the Sample R code<\/strong>\u00a0<a href=\"http:\/\/sites.williams.edu\/bklingen\/files\/2012\/09\/sampleRcode.r\">sampleRcode<\/a> and refer to the paper.<\/p>\n<p>The code automatically sources in the following two files:<\/p>\n<ul>\n<ol start=\"1\">\n<li>R-function for specifying and plotting candidate models: <a href=\"http:\/\/sites.williams.edu\/bklingen\/files\/2012\/09\/plotModels.r\">plotModels<\/a><\/li>\n<\/ol>\n<\/ul>\n<p><em>Input:<\/em> Dose, candidate models and optional guesses for\u00a0 placebo effect (low) and efficacy at maximum dose (high). For three-parameter models, you need to specify when defining the model at which dose you expect the maximum efficacy to occur (dmax).<\/p>\n<p><em>Output:<\/em> Trellis plot of candidate models. (For plotting and fitting non-linear models, you need to source nonlin_dr.r. If you want to plot and fit models with an identity or log-log link, specified via &#8220;family=binomial(link=identity)&#8221; or &#8220;family=binomial(link=loglog)&#8221; directly, source these slightly amended basic R functions: binomial1.r and makelink.r)<\/p>\n<ul>\n<ol start=\"2\">\n<li>R-function for obtaining adjusted P-values and MED estimates: <a href=\"http:\/\/sites.williams.edu\/bklingen\/files\/2012\/09\/perm_minP_GLM.r\">perm_minP_GLM<\/a><\/li>\n<\/ol>\n<\/ul>\n<p><em>Input:<\/em> Dose, response (preferrably as resp=cbind(y,n), where y is the number of successes and n the sample size at the dose levels), candidate models. <em>Output:<\/em> Critical value c for test of PoC, adjusted p-values for candidate models; MED estimate, various summary functions.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R-code for PoC and dose estimationt under model uncertainty with binary responses in a parallell design For an example, see the Sample R code\u00a0sampleRcode and refer to the paper. The code automatically sources in the following two files: R-function for specifying and plotting candidate models: plotModels Input: Dose, candidate models and optional guesses for\u00a0 placebo [&hellip;]<\/p>\n","protected":false},"author":342,"featured_media":0,"parent":510,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-438","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/pages\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/users\/342"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":16,"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/pages\/438\/revisions"}],"predecessor-version":[{"id":449,"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/pages\/438\/revisions\/449"}],"up":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/pages\/510"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/bklingen\/wp-json\/wp\/v2\/media?parent=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}