{"action":"created","issue":{"url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/10","repository_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign","labels_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/10/comments","events_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/10/events","html_url":"https://github.com/DeclareDesign/DeclareDesign/issues/10","id":157061015,"number":10,"title":"summarizing each type of object","user":{"login":"graemeblair","id":3320015,"avatar_url":"https://avatars.githubusercontent.com/u/3320015?v=3","gravatar_id":"","url":"https://api.github.com/users/graemeblair","html_url":"https://github.com/graemeblair","followers_url":"https://api.github.com/users/graemeblair/followers","following_url":"https://api.github.com/users/graemeblair/following{/other_user}","gists_url":"https://api.github.com/users/graemeblair/gists{/gist_id}","starred_url":"https://api.github.com/users/graemeblair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemeblair/subscriptions","organizations_url":"https://api.github.com/users/graemeblair/orgs","repos_url":"https://api.github.com/users/graemeblair/repos","events_url":"https://api.github.com/users/graemeblair/events{/privacy}","received_events_url":"https://api.github.com/users/graemeblair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"gerasy1987","id":9358589,"avatar_url":"https://avatars.githubusercontent.com/u/9358589?v=3","gravatar_id":"","url":"https://api.github.com/users/gerasy1987","html_url":"https://github.com/gerasy1987","followers_url":"https://api.github.com/users/gerasy1987/followers","following_url":"https://api.github.com/users/gerasy1987/following{/other_user}","gists_url":"https://api.github.com/users/gerasy1987/gists{/gist_id}","starred_url":"https://api.github.com/users/gerasy1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerasy1987/subscriptions","organizations_url":"https://api.github.com/users/gerasy1987/orgs","repos_url":"https://api.github.com/users/gerasy1987/repos","events_url":"https://api.github.com/users/gerasy1987/events{/privacy}","received_events_url":"https://api.github.com/users/gerasy1987/received_events","type":"User","site_admin":false},"assignees":[{"login":"gerasy1987","id":9358589,"avatar_url":"https://avatars.githubusercontent.com/u/9358589?v=3","gravatar_id":"","url":"https://api.github.com/users/gerasy1987","html_url":"https://github.com/gerasy1987","followers_url":"https://api.github.com/users/gerasy1987/followers","following_url":"https://api.github.com/users/gerasy1987/following{/other_user}","gists_url":"https://api.github.com/users/gerasy1987/gists{/gist_id}","starred_url":"https://api.github.com/users/gerasy1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerasy1987/subscriptions","organizations_url":"https://api.github.com/users/gerasy1987/orgs","repos_url":"https://api.github.com/users/gerasy1987/repos","events_url":"https://api.github.com/users/gerasy1987/events{/privacy}","received_events_url":"https://api.github.com/users/gerasy1987/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/milestones/1","html_url":"https://github.com/DeclareDesign/DeclareDesign/milestones/release%201","labels_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/milestones/1/labels","id":1790740,"number":1,"title":"release 1","description":"","creator":{"login":"graemeblair","id":3320015,"avatar_url":"https://avatars.githubusercontent.com/u/3320015?v=3","gravatar_id":"","url":"https://api.github.com/users/graemeblair","html_url":"https://github.com/graemeblair","followers_url":"https://api.github.com/users/graemeblair/followers","following_url":"https://api.github.com/users/graemeblair/following{/other_user}","gists_url":"https://api.github.com/users/graemeblair/gists{/gist_id}","starred_url":"https://api.github.com/users/graemeblair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemeblair/subscriptions","organizations_url":"https://api.github.com/users/graemeblair/orgs","repos_url":"https://api.github.com/users/graemeblair/repos","events_url":"https://api.github.com/users/graemeblair/events{/privacy}","received_events_url":"https://api.github.com/users/graemeblair/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-05-26T19:33:17Z","updated_at":"2016-05-26T19:38:40Z","due_on":"2015-12-04T05:00:00Z","closed_at":null},"comments":6,"created_at":"2016-05-26T19:33:17Z","updated_at":"2016-08-19T22:58:18Z","closed_at":null,"body":"<a href=\"https://github.com/graemeblair\"><img src=\"https://avatars.githubusercontent.com/u/3320015?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [graemeblair](https://github.com/graemeblair)**\r\n_Saturday Jun 20, 2015 at 15:22 GMT_\r\n_Originally opened as https://github.com/DeclareDesign/DeclareDesign-dev/issues/5_\r\n\r\n----\r\n\r\nHi guys,\r\n\r\nIn the future (maybe not in version 0.1?), we need a summarize function or functions that can be used to describe or visualize in plot or table the key parts of the registration--covariates, potential outcomes, design, and power. I'm now convinced by Alex that we should basically leave the analysis summarizing to the user. \r\n\r\n- summary(population)\r\n- summary(potential_outcomes)\r\n- summary(sampling)\r\n- summary(assignment) returns a detailed written description of the assignment, i.e. \"This is a clustered, block-randomized design with...\"\r\n- summary(estimator) -- includes description of estimand it is hitting, if any\r\nPropose a first set that we could do in coming weeks:\r\n- summary(assignment) returns a detailed written description of the assignment, i.e. \"This is a clustered, block-randomized design with...\"\r\n\r\n- plot method for diagnosis objects\r\n\r\n   - Note: one gnarly problem will be multi-arm trials -- need a way to visualize all the relevant comparisons. Another gnarly problem will be summarizing population CATEs - i.e., the expected distribution of the (sample) ATEs among a subgroup.\r\n\r\n\r\nOld ideas we decided not to do now:\r\n- table_experiment_data() returns a table that looks like a summary of realized data for covariates and potential_outcomes, but is instead based on the data definitions\r\n- outcomes_table() which I thought might print a visual or text description of the names and distributions of the potential outcomes;\r\na similar covariates_table() function.\r\n- histogram_ate() plots a histogram of the distribution of true ATEs in the population as defined by your sampling strategy (Alex's suggestion).\r\nNote: one gnarly problem will be multi-arm trials -- need a way to visualize all the relevant comparisons. Another gnarly problem will be summarizing population CATEs - i.e., the expected distribution of the (sample) ATEs among a subgroup."},"comment":{"url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/comments/241155518","html_url":"https://github.com/DeclareDesign/DeclareDesign/issues/10#issuecomment-241155518","issue_url":"https://api.github.com/repos/DeclareDesign/DeclareDesign/issues/10","id":241155518,"user":{"login":"gerasy1987","id":9358589,"avatar_url":"https://avatars.githubusercontent.com/u/9358589?v=3","gravatar_id":"","url":"https://api.github.com/users/gerasy1987","html_url":"https://github.com/gerasy1987","followers_url":"https://api.github.com/users/gerasy1987/followers","following_url":"https://api.github.com/users/gerasy1987/following{/other_user}","gists_url":"https://api.github.com/users/gerasy1987/gists{/gist_id}","starred_url":"https://api.github.com/users/gerasy1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerasy1987/subscriptions","organizations_url":"https://api.github.com/users/gerasy1987/orgs","repos_url":"https://api.github.com/users/gerasy1987/repos","events_url":"https://api.github.com/users/gerasy1987/events{/privacy}","received_events_url":"https://api.github.com/users/gerasy1987/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T22:58:18Z","updated_at":"2016-08-19T22:58:18Z","body":"I pushed the new version of the `summary.potential_outcomes()` to the summary branch. Here are some examples of output from the tests:\r\n\r\n- Simple declaration\r\n```r\r\npop1 <- declare_population(noise = \"rnorm(n_)\", size = 250)\r\npo1 <- declare_potential_outcomes(formula = Y ~ 0.25 * Z + noise,\r\n                                                 condition_names = c(0, 1),\r\n                                                 assignment_variable_name = \"Z\")\r\nsummary(po1)\r\n```\r\n```\r\nAn outcome Y is defined by the formula\r\nY ~ 0.25 * Z + noise\r\n\r\nLabels of potential outcomes\r\nZ_0, Z_1\r\n\r\nPotential outcomes call\r\ndeclare_potential_outcomes(formula = Y ~ 0.25 * Z + noise, condition_names = c(0, \r\n    1), assignment_variable_name = \"Z\")\r\n```\r\n\r\n- Multiple treatments\r\n```r\r\npop2 <- declare_population(noise = \"rnorm(n_)\", size = 250)\r\npo2 <- declare_potential_outcomes(formula = Y ~ 5 + 1*Z1 + 2*Z2 - 3*Z1*Z2 + noise,\r\n                                                 condition_names = list(Z1 = c(0, 1), \r\n                                                                        Z2 = c(0, 1)),\r\n                                                 assignment_variable_name = c(\"Z1\", \"Z2\"))\r\nsummary(po2)\r\n```\r\n```\r\nAn outcome Y is defined by the formula\r\nY ~ 5 + 1 * Z1 + 2 * Z2 - 3 * Z1 * Z2 + noise\r\n\r\nLabels of potential outcomes\r\nZ1_0_Z2_0, Z1_1_Z2_0, Z1_0_Z2_1, Z1_1_Z2_1\r\n\r\nPotential outcomes call\r\ndeclare_potential_outcomes(formula = Y ~ 5 + 1 * Z1 + 2 * Z2 - \r\n    3 * Z1 * Z2 + noise, condition_names = list(Z1 = c(0, 1), \r\n    Z2 = c(0, 1)), assignment_variable_name = c(\"Z1\", \"Z2\"))\r\n```\r\n- Custom PO function\r\n``` r\r\npop3 <- declare_population(noise = \"rnorm(n_)\", size = 250)\r\nmy_po <- function(data) { with(data, Z * 0.25 + noise) }\r\npo3 <- declare_potential_outcomes(potential_outcomes_function = my_po,\r\n                                  outcome_variable_name = 'Y',\r\n                                  condition_names = c(0, 1))\r\nsummary(po3)\r\n```\r\n```\r\nAn outcome Y is defined by a custom function\r\nfunction (data)  {     with(data, Z * 0.25 + noise) }\r\n\r\nLabels of potential outcomes\r\nZ_0, Z_1\r\n\r\nPotential outcomes call\r\ndeclare_potential_outcomes(potential_outcomes_function = function (data) \r\n{\r\n    with(data, Z * 0.25 + noise)\r\n}, outcome_variable_name = \"Y\", condition_names = c(0, 1))\r\n```\r\n- Inherit condition names example\r\n``` r\r\npop4 <- declare_population(noise = \"rnorm(n_)\", size = 250)\r\npo4_1 <- declare_potential_outcomes(formula = Y ~ 5 + .5*Z*rnorm(n_) + noise,\r\n                                    condition_names = c(0, 1),\r\n                                    assignment_variable_name = \"Z\")\r\npo4_2 <- declare_potential_outcomes(formula = Y2 ~ 5 + .25*Z + noise,\r\n                                    inherit_condition_names = TRUE,\r\n                                    assignment_variable_name = \"Z\")\r\nlapply(list(po4_1, po4_2), summary)\r\n```\r\n```\r\n[[1]]\r\nAn outcome Y is defined by the formula\r\nY ~ 5 + 0.5 * Z * rnorm(n_) + noise\r\n\r\nLabels of potential outcomes\r\nZ_0, Z_1\r\n\r\nPotential outcomes call\r\ndeclare_potential_outcomes(formula = Y ~ 5 + 0.5 * Z * rnorm(n_) + \r\n    noise, condition_names = c(0, 1), assignment_variable_name = \"Z\")\r\n\r\n[[2]]\r\nAn outcome Y2 is defined by the formula\r\nY2 ~ 5 + 0.25 * Z + noise\r\n\r\nLabels of potential outcomes\r\ninherit_condition_names = TRUE. The labels of potential outcomes will be inherited from the first potential_outcomes object created by declare_potential_outcomes with specified condition names.\r\n\r\nPotential outcomes call\r\ndeclare_potential_outcomes(formula = Y2 ~ 5 + 0.25 * Z + noise, \r\n    inherit_condition_names = TRUE, assignment_variable_name = \"Z\")\r\n```\r\n"}}
{"actor":{"display_login":"gerasy1987"}}