{"action":"created","issue":{"url":"https://api.github.com/repos/Rapporter/pander/issues/232","labels_url":"https://api.github.com/repos/Rapporter/pander/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/Rapporter/pander/issues/232/comments","events_url":"https://api.github.com/repos/Rapporter/pander/issues/232/events","html_url":"https://github.com/Rapporter/pander/issues/232","id":120776796,"number":232,"title":"pander.lm() and pander.summary.lm(): Reordering of coefficients","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars.githubusercontent.com/u/1741643?v=3","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-07T13:43:43Z","updated_at":"2015-12-08T21:32:49Z","closed_at":"2015-12-08T06:00:37Z","body":"The coefficient that appears first in the output of `summary.lm()` seems to appear *last* in the output of `pander::pander.lm()`. It looks like this is [by design](https://github.com/Rapporter/pander/blob/b20954089a92c788a2678c6925be811bf9bb0aac/R/S3.R#L318-L320), but this makes models without intercept look very awkward.\r\n\r\n```\r\n> lm(Petal.Width~Petal.Length+Sepal.Width+Species-1, iris) %>% pander::pander\r\n\r\n--------------------------------------------------------------------\r\n        &nbsp;           Estimate   Std. Error   t value   Pr(>|t|) \r\n----------------------- ---------- ------------ --------- ----------\r\n    **Sepal.Width**       0.202       0.0442      4.571    1.03e-05 \r\n\r\n   **Speciessetosa**     -0.6953      0.1424     -4.882   2.739e-06 \r\n\r\n **Speciesversicolor**   0.04165      0.1546     0.2695     0.7879  \r\n\r\n **Speciesvirginica**     0.4806      0.1901      2.529    0.01251  \r\n\r\n   **Petal.Length**       0.1701     0.03489      4.876   2.808e-06 \r\n--------------------------------------------------------------------\r\n\r\nTable: Fitting linear model: Petal.Width ~ Petal.Length + Sepal.Width + Species - 1\r\n\r\n> lm(Petal.Width~Petal.Length+Sepal.Width+Species-1, iris) %>% summary\r\n\r\nCall:\r\nlm(formula = Petal.Width ~ Petal.Length + Sepal.Width + Species - \r\n    1, data = iris)\r\n\r\nResiduals:\r\n     Min       1Q   Median       3Q      Max \r\n-0.55861 -0.08486 -0.00190  0.09073  0.48605 \r\n\r\nCoefficients:\r\n                  Estimate Std. Error t value Pr(>|t|)    \r\nPetal.Length       0.17012    0.03489   4.876 2.81e-06 ***\r\nSepal.Width        0.20203    0.04420   4.571 1.03e-05 ***\r\nSpeciessetosa     -0.69529    0.14242  -4.882 2.74e-06 ***\r\nSpeciesversicolor  0.04165    0.15457   0.269   0.7879    \r\nSpeciesvirginica   0.48064    0.19005   2.529   0.0125 *  \r\n---\r\nSignif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\r\n\r\nResidual standard error: 0.1685 on 145 degrees of freedom\r\nMultiple R-squared:  0.9864,\tAdjusted R-squared:  0.9859 \r\nF-statistic:  2100 on 5 and 145 DF,  p-value: < 2.2e-16\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/Rapporter/pander/issues/comments/163024003","html_url":"https://github.com/Rapporter/pander/issues/232#issuecomment-163024003","issue_url":"https://api.github.com/repos/Rapporter/pander/issues/232","id":163024003,"user":{"login":"daroczig","id":495736,"avatar_url":"https://avatars.githubusercontent.com/u/495736?v=3","gravatar_id":"","url":"https://api.github.com/users/daroczig","html_url":"https://github.com/daroczig","followers_url":"https://api.github.com/users/daroczig/followers","following_url":"https://api.github.com/users/daroczig/following{/other_user}","gists_url":"https://api.github.com/users/daroczig/gists{/gist_id}","starred_url":"https://api.github.com/users/daroczig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daroczig/subscriptions","organizations_url":"https://api.github.com/users/daroczig/orgs","repos_url":"https://api.github.com/users/daroczig/repos","events_url":"https://api.github.com/users/daroczig/events{/privacy}","received_events_url":"https://api.github.com/users/daroczig/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T21:32:49Z","updated_at":"2015-12-08T21:32:49Z","body":"I spent some time digging the git history and found d28cf55cd727464aeccb127f918f7e5ee792149f to be the related commit. This is due to #46, and we are moving the intercept to the bottom of the table as this looked appropriate based on the `stargazer` behavior.\r\n\r\n@krlmlr @kovla does it make sense? Not sure if it's needed or not (personally, I do not care if the intercept is on the top or at the bottom of the table), looking forward to any feedback. And of course we can make this optional."}}