All About Statistics Tue, 19 Jun 2018 22:53:24 +0000 en-US hourly 1 http://wordpress.org/?v=3.4.2 statsblogshttps://feedburner.google.com Data science teaching position in London http://feedproxy.google.com/~r/statsblogs/~3/NO6ewEaL-R8/ /2018/06/19/data-science-teaching-position-in-london/#comments Tue, 19 Jun 2018 22:53:24 +0000 Andrew http://andrewgelman.com/?p=39579

Seth Flaxman sends this along: The Department of Mathematics at Imperial College London wishes to appoint a Senior Strategic Teaching Fellow in Data Science, to be in post by September 2018 or as soon as possible thereafter. The role will involve developing and delivering a suite of new data science modules, initially for the MSc […]

The post Data science teaching position in London appeared first on Statistical Modeling, Causal Inference, and Social Science.

The post Data science teaching position in London appeared first on All About Statistics.

]]>
(This article was originally published at Statistical Modeling, Causal Inference, and Social Science, and syndicated at StatsBlogs.)

Seth Flaxman sends this along:

The Department of Mathematics at Imperial College London wishes to appoint a Senior Strategic Teaching Fellow in Data Science, to be in post by September 2018 or as soon as possible thereafter.

The role will involve developing and delivering a suite of new data science modules, initially for the MSc Statistics Data Science stream and ultimately for a variety of programmes across Imperial College. The postholder will be based in the statistics section of the Department of Mathematics (http://www.imperial.ac.uk/statistics) and will work closely with the Data Science Institute (http://www.imperial.ac.uk/data-science/) to transform the teaching of data science across all faculties of Imperial College.

The job posting (#NAT00183) can be found here:

https://www.jobs.ac.uk/job/BKA900/senior-strategic-teaching-fellow-in-statistics/

This is a 36 month fixed term contract. Closing date is 29 June 2018.

Informal enquiries about the role are welcomed and should be directed to Dr Seth Flaxman (Lecturer in Machine Learning and Big Data, Department of Mathematics and Data Science Institute): s.flaxman@imperial.ac.uk

Seth designed the curriculum, and it looks cool and very modern. So it could be fun to teach, and you could have some impact, training data scientists of the future.

The post Data science teaching position in London appeared first on Statistical Modeling, Causal Inference, and Social Science.



Please comment on the article here: Statistical Modeling, Causal Inference, and Social Science

The post Data science teaching position in London appeared first on All About Statistics.

]]>
/2018/06/19/data-science-teaching-position-in-london/feed/ 0 /2018/06/19/data-science-teaching-position-in-london/
a chain of collapses http://feedproxy.google.com/~r/statsblogs/~3/TiGYB0CSk1U/ /2018/06/19/a-chain-of-collapses/#comments Tue, 19 Jun 2018 22:18:16 +0000 xi'an http://xianblog.wordpress.com/?p=36354 A quick riddler resolution during a committee meeting (!) of a short riddle: 36 houses stand in a row and collapse at times t=1,2,..,36. In addition, once a house collapses, the neighbours if still standing collapse at the next time unit. What are the shortest and longest lifespans of this row? Since a house with […]

The post a chain of collapses appeared first on All About Statistics.

]]>
(This article was originally published at R – Xi'an's Og, and syndicated at StatsBlogs.)

A quick riddler resolution during a committee meeting (!) of a short riddle: 36 houses stand in a row and collapse at times t=1,2,..,36. In addition, once a house collapses, the neighbours if still standing collapse at the next time unit. What are the shortest and longest lifespans of this row?

Since a house with index i would collapse on its own by time i, the longest lifespan is 36, which can be achieved with the extra rule when the collapsing times are perfectly ordered. For the shortest lifespan, I ran a short R code implementing the rules and monitoring its minimum. Which found 7 as the minimal number for 10⁵ draws. However, with an optimal ordering, one house plus one or two neighbours of the most recently collapsed, leading to a maximal number of collapsed houses after k time units being

1+2(k-1)+1+2(k-2)+….=k+k(k-1)=k²

which happens to be equal to 36 for k=6. (Which was also obtained in 10⁶ draws!) This also gives the solution for any value of k.



Please comment on the article here: R – Xi'an's Og

The post a chain of collapses appeared first on All About Statistics.

]]>
/2018/06/19/a-chain-of-collapses/feed/ 0 /2018/06/19/a-chain-of-collapses/
Opportunity for Comment! http://feedproxy.google.com/~r/statsblogs/~3/C_Fn2I1-tn8/ /2018/06/19/opportunity-for-comment/#comments Tue, 19 Jun 2018 15:25:20 +0000 Dan Simpson http://andrewgelman.com/?p=39569

(This is Dan) Last September, Jonah, Aki, Michael, Andrew and I wrote a paper on the role of visualization in the Bayesian workflow.  This paper is going to be published as a discussion paper in the Journal of the Royal Statistical Society Series A and the associated read paper meeting (where we present the paper and […]

The post Opportunity for Comment! appeared first on Statistical Modeling, Causal Inference, and Social Science.

The post Opportunity for Comment! appeared first on All About Statistics.

]]>
(This article was originally published at Statistical Modeling, Causal Inference, and Social Science, and syndicated at StatsBlogs.)

(This is Dan)

Last September, Jonah, Aki, Michael, Andrew and I wrote a paper on the role of visualization in the Bayesian workflow.  This paper is going to be published as a discussion paper in the Journal of the Royal Statistical Society Series A and the associated read paper meeting (where we present the paper and people present discussions) will take place at the RSS conference in Cardiff on 5 September, 2018.

The instructions for submitting a discussion on the paper (either in person or via email) are given here. The gist is in this paragraph:

Further shorter comments (up to five minutes or 400 words in writing) are then invited from the audience. If the two hours in total permit before the authors are given the opportunity to respond very briefly verbally (and at greater length in writing in the journal), the secretary for the meeting will read out any contributions that have been sent in from people who cannot be present. Contributions in writing (again, 400 words maximum) are welcome up to two weeks after the meeting.

If anyone has thoughts on that paper or what we could’ve done better or differently, now is y0ur opportunity to say so in print!

There will be two other papers presented at the same meeting (Graphics for uncertainty by Adrian Bowman and Visualizing spatiotemporal models with virtual reality: from fully immersive environments to applications in stereoscopic view by Stefano Castruccio, Marc Genton, and Ying Sun), so it’s sure to be a barn-burner. You should read them and submit comments on them too if you’re so inclined!

The post Opportunity for Comment! appeared first on Statistical Modeling, Causal Inference, and Social Science.



Please comment on the article here: Statistical Modeling, Causal Inference, and Social Science

The post Opportunity for Comment! appeared first on All About Statistics.

]]>
/2018/06/19/opportunity-for-comment/feed/ 0 /2018/06/19/opportunity-for-comment/
What is the role of qualitative methods in addressing issues of replicability, reproducibility, and rigor? http://feedproxy.google.com/~r/statsblogs/~3/AqDd3hyGXeQ/ /2018/06/19/what-is-the-role-of-qualitative-methods-in-addressing-issues-of-replicability-reproducibility-and-rigor/#comments Tue, 19 Jun 2018 13:29:31 +0000 Andrew http://andrewgelman.com/?p=39562

Kara Weisman writes: I’m a PhD student in psychology, and I attended your talk at the Stanford Graduate School of Business earlier this year. I’m writing to ask you about something I remember you discussing at that talk: The possible role of qualitative methods in addressing issues of replicability, reproducibility, and rigor. In particular, I […]

The post What is the role of qualitative methods in addressing issues of replicability, reproducibility, and rigor? appeared first on Statistical Modeling, Causal Inference, and Social Science.

The post What is the role of qualitative methods in addressing issues of replicability, reproducibility, and rigor? appeared first on All About Statistics.

]]>
(This article was originally published at Statistical Modeling, Causal Inference, and Social Science, and syndicated at StatsBlogs.)

Kara Weisman writes:

I’m a PhD student in psychology, and I attended your talk at the Stanford Graduate School of Business earlier this year. I’m writing to ask you about something I remember you discussing at that talk: The possible role of qualitative methods in addressing issues of replicability, reproducibility, and rigor.

In particular, I think you spoke about how many (all?) of us “quantitative” researchers in fact draw on more qualitative observations in piloting studies, forming hypotheses, etc., without labeling it as such. You asked us to consider how many people we really think we need to talk to in order to have a sense of a phenomenon (on the idea that’s it’s probably more like 3 or 4 rather than 300 or 400). I think part of the point here was that our statistical models don’t reflect how we actually think about the knowledge we gain from conducting experiments. (Forgive me if I’m mangling your ideas!)

Anyway, this got me thinking about the possible role of qualitative research and “mixed methods” in pushing psychology and other fields toward more replicable, reproducible, and rigorous research – the basic idea being that qualitative methods, though less “objective” than quantitative approaches, might have complementary properties that would be useful in forming priors/hypotheses, providing a check on what kinds of results seem reasonable, and guiding the interpretation and generalization of results.

I responded:

Yes, I think these ideas are important, and I have not thought too systematically about it. This paper is somewhat relevant. Also you could look at this talk, where I discuss how we could possibly make progress in a world with weak theory and incremental improvements:

I agree with you 100% that qualitative methods are important. One way to think about this is that we learn through measurement, and qualitative research is used to decide what to measure and how to measure it. The other way to think about this is . . . where do treatments come from? Researchers just think them up, right? It presumably would be better to do this thinking-them-up more systematically, no? That’s qualitative research.

Weisman replied:

Qualitative research could guide what we measure (and how), as well as what we manipulate (and how). I think it could also guide what “priors” we bring to our analyses (formally or informally) and therefore what we make of our results. (And I’d argue that in some sense it already does – it’s just that most of us use informal intuitions from piloting/observation rather than systematic qualitative approaches, and then we don’t report these observations anywhere.)

The post What is the role of qualitative methods in addressing issues of replicability, reproducibility, and rigor? appeared first on Statistical Modeling, Causal Inference, and Social Science.



Please comment on the article here: Statistical Modeling, Causal Inference, and Social Science

The post What is the role of qualitative methods in addressing issues of replicability, reproducibility, and rigor? appeared first on All About Statistics.

]]>
/2018/06/19/what-is-the-role-of-qualitative-methods-in-addressing-issues-of-replicability-reproducibility-and-rigor/feed/ 0 /2018/06/19/what-is-the-role-of-qualitative-methods-in-addressing-issues-of-replicability-reproducibility-and-rigor/
HTML Widgets for Non-HTML Output Formats http://feedproxy.google.com/~r/statsblogs/~3/rdGgs4n7HKE/ /2018/06/19/html-widgets-for-non-html-output-formats/#comments Tue, 19 Jun 2018 00:00:00 +0000 Yihui's Blog on Yihui Xie | 谢益辉 https://yihui.name/en/2018/06/html-widgets-non-html/

Not surprisingly, HTML widgets were designed for HTML output formats (e.g., rmarkdown::html_document and rmarkdown::ioslides_presentation). Their interactivity relies on JavaScript. In general, you should not expect JavaScript to work in LaTeX/PDF or Word or PowerPoint.

In January 2015, I gave an introductory talk on HTML widgets in the LA R User Group. I joked in the talk that “If you ask me how to use HTML widgets in Word or LaTeX, we cannot be friends .” (I meant, how could you possibly ask such a question?) A year later, this became only a half joke.

While developing bookdown in 2016, I added a feature in knitr to “support” HTML widgets for non-HTML output, which basically means if the output is not HTML, knitr will try to use the webshot package to automatically take a screenshot of the widget, and embed the static screenshot in the output. Of course, you won’t be able to interact with this static image, but it may be better than nothing (or throwing an error).

The detailed documentation about this feature can be found in Section 2.10 of the bookdown book.

Similarly, Shiny apps won’t work in non-HTML output, either. If you want to include a screenshot of a Shiny app in a knitr document, you may explicitly use the knitr::include_app() function after you publish the app to a server. More generally, you can include a screenshot of any web page via knitr::include_url() when the output format is not HTML.

Screenshotting HTML widgets, Shiny apps, and arbitrary URLs works in any non-HTML output formats: PDF, Word, EPUB, RTF, and PowerPoint, etc. If you want, you may even force a screenshot in HTML output, too (see documentation).

I’d like to thank Winston for the heavy-lifting in the webshot package. It is a very neat package.

The post HTML Widgets for Non-HTML Output Formats appeared first on All About Statistics.

]]>
(This article was originally published at Yihui's Blog on Yihui Xie | 谢益辉, and syndicated at StatsBlogs.)

Not surprisingly, HTML widgets were designed for HTML output formats (e.g., rmarkdown::html_document and rmarkdown::ioslides_presentation). Their interactivity relies on JavaScript. In general, you should not expect JavaScript to work in LaTeX/PDF or Word or PowerPoint.

In January 2015, I gave an introductory talk on HTML widgets in the LA R User Group. I joked in the talk that “If you ask me how to use HTML widgets in Word or LaTeX, we cannot be friends .” (I meant, how could you possibly ask such a question?) A year later, this became only a half joke.

While developing bookdown in 2016, I added a feature in knitr to “support” HTML widgets for non-HTML output, which basically means if the output is not HTML, knitr will try to use the webshot package to automatically take a screenshot of the widget, and embed the static screenshot in the output. Of course, you won’t be able to interact with this static image, but it may be better than nothing (or throwing an error).

The detailed documentation about this feature can be found in Section 2.10 of the bookdown book.

Similarly, Shiny apps won’t work in non-HTML output, either. If you want to include a screenshot of a Shiny app in a knitr document, you may explicitly use the knitr::include_app() function after you publish the app to a server. More generally, you can include a screenshot of any web page via knitr::include_url() when the output format is not HTML.

Screenshotting HTML widgets, Shiny apps, and arbitrary URLs works in any non-HTML output formats: PDF, Word, EPUB, RTF, and PowerPoint, etc. If you want, you may even force a screenshot in HTML output, too (see documentation).

I’d like to thank Winston for the heavy-lifting in the webshot package. It is a very neat package.



Please comment on the article here: Yihui's Blog on Yihui Xie | 谢益辉

The post HTML Widgets for Non-HTML Output Formats appeared first on All About Statistics.

]]>
/2018/06/19/html-widgets-for-non-html-output-formats/feed/ 0 /2018/06/19/html-widgets-for-non-html-output-formats/
Books to Read While the Algae Grow in Your Fur, December 2016 http://feedproxy.google.com/~r/statsblogs/~3/F0mZ2KMP0ok/ /2018/06/18/books-to-read-while-the-algae-grow-in-your-fur-december-2016-2/#comments Mon, 18 Jun 2018 15:50:20 +0000 Three-Toed Sloth https://www.statsblogs.com/?guid=bb7ebcac2e3a4f5b7894e7a19fbeee2f Attention conservation notice: I have no taste. Laila Lalami, The Moor's Account Historical fiction, in which the Narvaez expedition across what's now the American South and Southwest in the early 1500s is told from the view-point of the Moorish ...

The post Books to Read While the Algae Grow in Your Fur, December 2016 appeared first on All About Statistics.

]]>
(This article was originally published at Three-Toed Sloth , and syndicated at StatsBlogs.)

Attention conservation notice: I have no taste.

Laila Lalami, The Moor's Account
Historical fiction, in which the Narvaez expedition across what's now the American South and Southwest in the early 1500s is told from the view-point of the Moorish slave Estebanico. It works well as both a historical tale and a lovely piece of writing.
Palani Mohan, Hunting with Eagles: In the Realm of the Mongolian Kazakhs
Beautiful black-and-white photographs of, as it says, Mongolian Kazakhs hunting with eagles, and their landscape. Many of them are just stunningly composed.
M. J. Carter, The Strangler Vine
Mind-candy historical mystery, set among the sahibs of pre-Mutiny British India.
N. K. Jemisin, The Obelisk Gate
Sequel to The Fifth Season, continuing the story at the same high level of quality.

Books to Read While Algae Grow in Your Fur; Tales of Our Ancestors; Scientifiction; Afghanistan and Central Asia; Pleasures of Detection, Portraits of Crime



Please comment on the article here: Three-Toed Sloth

The post Books to Read While the Algae Grow in Your Fur, December 2016 appeared first on All About Statistics.

]]>
/2018/06/18/books-to-read-while-the-algae-grow-in-your-fur-december-2016-2/feed/ 0 /2018/06/18/books-to-read-while-the-algae-grow-in-your-fur-december-2016-2/
Power analysis and NIH-style statistical practice: What’s the implicit model? http://feedproxy.google.com/~r/statsblogs/~3/p01vjaajHo0/ /2018/06/18/power-analysis-and-nih-style-statistical-practice-whats-the-implicit-model/#comments Mon, 18 Jun 2018 13:18:58 +0000 Andrew http://andrewgelman.com/?p=37616

So. Following up on our discussion of “the 80% power lie,” I was thinking about the implicit model underlying NIH’s 80% power rule. Several commenters pointed out that, to have your study design approved by NSF, it’s not required that you demonstrate that you have 80% power for real; what’s needed is to show 80% […]

The post Power analysis and NIH-style statistical practice: What’s the implicit model? appeared first on Statistical Modeling, Causal Inference, and Social Science.

The post Power analysis and NIH-style statistical practice: What’s the implicit model? appeared first on All About Statistics.

]]>
(This article was originally published at Statistical Modeling, Causal Inference, and Social Science, and syndicated at StatsBlogs.)

So. Following up on our discussion of “the 80% power lie,” I was thinking about the implicit model underlying NIH’s 80% power rule.

Several commenters pointed out that, to have your study design approved by NSF, it’s not required that you demonstrate that you have 80% power for real; what’s needed is to show 80% power conditional on an effect size of interest, and also you must demonstrate that this particular effect size is plausible. On the other hand, in NIH-world the null hypothesis could be true: indeed, in some way the purpose of the study is to see, well, not if the null hypothesis is true, but if there’s enough evidence to reject the null.

So, given all this, what’s the implicit model? Let “theta” be the parameter of interest, and suppose the power analysis is performed assuming theta = 0.5, say, on some scale.

My guess, based on how power analysis is usually done and on how studies actually end up, is that in this sort of setting the true average effect size is more like 0.1, with a lot of variation: perhaps it’s -0.1 in some settings and +0.3 in others.

But forget about what I think. Let’s ask: what does the NIH think, or what distribution for theta is implied by NIH’s policies and actions?

To start with, if the effect is real, we’re supposed to think that theta = 0.5 is a conservative estimate. So maybe we can imagine some distribution of effect sizes like normal with mean 0.75, sd 0.25, so that the effect is probably larger than the minimal level specified in the power analysis.

Next, I think there’s some expectation that the effect is probably real, let’s say there’s at least a 50% chance of there being a large effect as hypothesized.

Finally, the NIH accepts that researcher’s model could’ve been wrong, in which case theta is some low value. Not exactly zero, but maybe somewhere in a normal distribution with mean 0 and standard deviation 0.1, say.

Put this together and you get a bimodal distribution:

And this doesn’t typically make sense, that something would either have a near-zero, undetectable effect, or a huge effect with little possibility of anything in between. But that’s what’s the NIH is implicitly assuming, I think.

The post Power analysis and NIH-style statistical practice: What’s the implicit model? appeared first on Statistical Modeling, Causal Inference, and Social Science.



Please comment on the article here: Statistical Modeling, Causal Inference, and Social Science

The post Power analysis and NIH-style statistical practice: What’s the implicit model? appeared first on All About Statistics.

]]>
/2018/06/18/power-analysis-and-nih-style-statistical-practice-whats-the-implicit-model/feed/ 0 /2018/06/18/power-analysis-and-nih-style-statistical-practice-whats-the-implicit-model/
The BOOTSTRAP statement for t tests in SAS http://feedproxy.google.com/~r/statsblogs/~3/US49WFxv7D4/ /2018/06/18/the-bootstrap-statement-for-t-tests-in-sas/#comments Mon, 18 Jun 2018 09:23:42 +0000 Rick Wicklin https://blogs.sas.com/content/iml/?p=21991

Bootstrap resampling is a powerful way to estimate the standard error for a statistic without making any parametric assumptions about its sampling distribution. The bootstrap method is often implemented by using a sequence of calls to resample from the data, compute a statistic on each sample, and analyze the bootstrap [...]

The post The BOOTSTRAP statement for t tests in SAS appeared first on The DO Loop.

The post The BOOTSTRAP statement for t tests in SAS appeared first on All About Statistics.

]]>
(This article was originally published at The DO Loop, and syndicated at StatsBlogs.)

Bootstrap resampling is a powerful way to estimate the standard error for a statistic without making any parametric assumptions about its sampling distribution. The bootstrap method is often implemented by using a sequence of calls to resample from the data, compute a statistic on each sample, and analyze the bootstrap distribution. An example is provided in the article "Compute a bootstrap confidence interval in SAS." This process can be lengthy and in Base SAS it requires reading and writing a large amount of data. In SAS/STAT 14.3 (SAS 9.4m5), the TTEST procedure supports the BOOTSTRAP statement, which automatically performs a bootstrap analysis of one-sample and two-sample t tests. The BOOTSTRAP statement also applies to two-sample paired tests.

The difference of means between two groups

The BOOTSTRAP statement makes it easy to obtain bootstrap estimates of bias and standard error for a statistic and confidence intervals (CIs) for the underlying parameter. The BOOTSTRAP statement supports several estimates for the confidence intervals, including normal-based intervals, t-based intervals, percentile intervals, and bias-adjusted intervals. This section shows how to obtain bootstrap estimates for a two-sample t test. The statistic of interest is the difference between the means of two groups.

The following SAS DATA step subsets the Sashelp.Cars data to create a data set that contains only two types of vehicles: sedans and SUVs. A call to PROC UNIVARIATE displays a comparative histogram that shows the distributions of the MPG_City variable for each group. The MPG_City variable measures the fuel efficiency (in miles per gallon) for each vehicle during typical city driving.

/* create data set that has two categories: 'Sedan' and 'SUV' */
data Sample;
set Sashelp.Cars(keep=Type MPG_City);
if Type in ('Sedan' 'SUV');
run;
 
proc univariate data=Sample;
   class Type;
   histogram MPG_City;
   inset N Mean Std Skew Kurtosis / position=NE;
   ods select histogram;
run;

Bootstrap estimates for a two-sample t test

Suppose that you want to test whether the mean MPG of the "SUV" group is significantly different from the mean of the "Sedan" group. The groups appear to have different variances, so you would probably choose the Satterthwaite version of the t test, which accommodates different variances. You can use PROC TTEST to run a two-sample t test for these data, but in looking at the distributions of the groups, you might be concerned that the normality assumptions for the t test are not satisfied by these data. Notice that the distribution of the MPG_City variable for the "Sedan" group has high skewness (1.3) and moderately high kurtosis (1.9). Although the t test is somewhat robust to the normality assumption, you might want to use the bootstrap method to estimate the standard error and confidence interval for the difference of means between the two groups.

If you are using SAS/STAT 14.3, you can compute bootstrap estimates for a t test by using the BOOTSTRAP statement, as follows:

title "Bootstrap Estimates with Percentile CI";
proc ttest data=Sample;
   class Type;
   var MPG_City;
   bootstrap / seed=123 nsamples=10000 bootci=percentile;  /* or BOOTCI=BC */
run;

The BOOTSTRAP statement supports three options:

  • The SEED= option initializes the internal random number generator for the TTEST procedure.
  • The NSAMPLES= option specifies the number of bootstrap resamples to be drawn from the data.
  • The BOOTCI= option specifies the estimate for the confidence interval for the parameter. This example uses the PERCENTILE method, which uses the α/2 and 1 – α/2 quantiles of the bootstrap distribution as the endpoints of the confidence interval. A more sophisticated second-order method is the bias-corrected interval, which you can specify by using the BOOTCI=BC option. For educational purposes, you might want to compare these nonparametric estimates with more traditional estimates such as t-based confidence intervals (BOOTCI=TBOOTSE).

The TTEST procedure produces several tables and graphs, but I have highlighted a few statistics in two tables. The top table is the "ConfLimits" table, which is based on the data and shows the traditional statistics for the t test. The estimate for the difference in means between the "SUV" and "Sedan" groups is -4.98 and is highlighted in blue. The traditional (parametric) estimate for a 95% confidence interval is highlighted in red. The interval is [-5.87, -4.10], which does not contain 0, therefore you can conclude that the group means are significantly different at the 0.05 significance level.

The lower table is the "Bootstrap" table, which is based on the bootstrap resamples. The TTEST documentation explains the resampling process and the computation of the bootstrap statistics. The top row of the table shows estimates for the difference of means. The bootstrap estimate for the standard error is 0.45. The estimate of bias (which subtracts the average bootstrap statistic from the sample statistic) is -0.01, which is small. The percentile estimate for the confidence interval is [-5.87, -4.14], which is similar to the parametric interval estimate in the top table. (For comparison, the bias-adjusted CI is also similar: [-5.85, -4.12].) Every cell in this table will change if you change the SEED= or NSAMPLES= options because the values in this table are based on the bootstrap samples.

Although the difference of means is the most frequent statistic to bootstrap, you can see from the lower table that the BOOTSTRAP statement also estimates the standard error, bias, and confidence interval for the standard deviation of the difference. Although this article focuses on the two-sample t test, the BOOTSTRAP statement also applies to one sample t tests.

In summary, the BOOTSTRAP statement in PROC TTEST in SAS/STAT 14.3 makes it easy to obtain bootstrap estimates for statistics in one-sample or two-sample t tests (and paired t tests). By using the BOOTSTRAP statement, the manual three-step bootstrap process (resample, compute statistics, and summarize) is reduced to a zero-step process. The TTEST procedure handles the details for you.

The post The BOOTSTRAP statement for t tests in SAS appeared first on The DO Loop.



Please comment on the article here: The DO Loop

The post The BOOTSTRAP statement for t tests in SAS appeared first on All About Statistics.

]]>
/2018/06/18/the-bootstrap-statement-for-t-tests-in-sas/feed/ 0 /2018/06/18/the-bootstrap-statement-for-t-tests-in-sas/
10th ECB Workshop on Forecasting Techniques, Frankfurt http://feedproxy.google.com/~r/statsblogs/~3/zGB48mJxV7A/ /2018/06/18/10th-ecb-workshop-on-forecasting-techniques-frankfurt/#comments Mon, 18 Jun 2018 08:22:00 +0000 Francis Diebold /?guid=a3cb86aaa5fe24249810b0ab11b0c446 Starts now, program here. Looks like a great lineup. Most of the papers are posted, and the organizers also plan to post presentation slides following the conference. Presumably in future weeks I'll blog on some of the presentations.

The post 10th ECB Workshop on Forecasting Techniques, Frankfurt appeared first on All About Statistics.

]]>
(This article was originally published at No Hesitations, and syndicated at StatsBlogs.)

Starts now, program here. Looks like a great lineup. Most of the papers are posted, and the organizers also plan to post presentation slides following the conference. Presumably in future weeks I'll blog on some of the presentations.



Please comment on the article here: No Hesitations

The post 10th ECB Workshop on Forecasting Techniques, Frankfurt appeared first on All About Statistics.

]]>
/2018/06/18/10th-ecb-workshop-on-forecasting-techniques-frankfurt/feed/ 0 /2018/06/18/10th-ecb-workshop-on-forecasting-techniques-frankfurt/
One Little Thing: knitr::combine_words() http://feedproxy.google.com/~r/statsblogs/~3/2PiZbIe6fTM/ /2018/06/18/one-little-thing-knitrcombine_words/#comments Mon, 18 Jun 2018 00:00:00 +0000 Yihui's Blog on Yihui Xie | 谢益辉 https://yihui.name/en/2018/06/knitr-combine-words/

When you want to output a character vector for humans to read, you probably don’t want something like [1] a b c, which is the normal way to print a vector in R. Instead, you may want a character string "a, b, and c" (Oxford comma FTW!). In 2014, I gave a guest lecture in a course at Iowa State. I prepared an example in which I wanted to output the names of some genes dynamically with an inline R expression in a knitr document. In the beginning, I didn’t want to spend too much time on this task, so I just used `r paste(x, collapse = ', ')`, which would output a character string like "a, b, c". This did not feel natural in the context (e.g., “We identified genes a, b, c.”).

Driven by perfectionism, I decided to write a function, which ended up in the knitr package as knitr::combine_words(). The implementation was actually quite simple. Basically, for a single word, it will just return this word; for two words A and B, it return "A and B"; for three or more words, it returns "A, B, C, ..., Y, and Z". The function also has a few arguments that can customize the output. For example, if you want to output the words in pairs of backticks, you may use knitr::combine_words(x, before = '`'):

knitr::combine_words(LETTERS[1:5], before = '`')
# output: `A`, `B`, `C`, `D`, and `E`

Since then, I have used this function by myself several times. Today I saw a Stack Overflow question that asked about the same thing, so I thought it might be a good idea to reveal this little function in knitr, although I’m relatively sure someone else must have also implemented it independently in other packages.

P.S. On an only marginally related note, here is a cat trying to demonstrate the importance of the “Oxford comma” (the Oxford cat?):

Meerkat, meerkat, the Oxford cat, and meerkat

The post One Little Thing: knitr::combine_words() appeared first on All About Statistics.

]]>
(This article was originally published at Yihui's Blog on Yihui Xie | 谢益辉, and syndicated at StatsBlogs.)

When you want to output a character vector for humans to read, you probably don’t want something like [1] a b c, which is the normal way to print a vector in R. Instead, you may want a character string "a, b, and c" (Oxford comma FTW!). In 2014, I gave a guest lecture in a course at Iowa State. I prepared an example in which I wanted to output the names of some genes dynamically with an inline R expression in a knitr document. In the beginning, I didn’t want to spend too much time on this task, so I just used `r paste(x, collapse = ', ')`, which would output a character string like "a, b, c". This did not feel natural in the context (e.g., “We identified genes a, b, c.”).

Driven by perfectionism, I decided to write a function, which ended up in the knitr package as knitr::combine_words(). The implementation was actually quite simple. Basically, for a single word, it will just return this word; for two words A and B, it return "A and B"; for three or more words, it returns "A, B, C, ..., Y, and Z". The function also has a few arguments that can customize the output. For example, if you want to output the words in pairs of backticks, you may use knitr::combine_words(x, before = '`'):

knitr::combine_words(LETTERS[1:5], before = '`')
# output: `A`, `B`, `C`, `D`, and `E`

Since then, I have used this function by myself several times. Today I saw a Stack Overflow question that asked about the same thing, so I thought it might be a good idea to reveal this little function in knitr, although I’m relatively sure someone else must have also implemented it independently in other packages.

P.S. On an only marginally related note, here is a cat trying to demonstrate the importance of the “Oxford comma” (the Oxford cat?):

Meerkat, meerkat, the Oxford cat, and meerkat



Please comment on the article here: Yihui's Blog on Yihui Xie | 谢益辉

The post One Little Thing: knitr::combine_words() appeared first on All About Statistics.

]]>
/2018/06/18/one-little-thing-knitrcombine_words/feed/ 0 /2018/06/18/one-little-thing-knitrcombine_words/