Category Archives: Research

Core Curriculum Teaching Fellow 2018-19

As a Core Curriculum Teaching Fellow, my project will develop a new course called “Statistics for Research” focusing on innovation, undergraduate research, and writing across the curriculum as an alternative to the traditional Introduction to Statistics, Stat 145. Intro Stats is one of the largest courses on campus with 1000-1200 students per semester in over 20 sections. This Statistics for Research course will cover the traditional material, but in a modern evidence-based way by integrating real data in the context of case studies, fostering active learning, and using technology to explore concepts and analyze large real datasets and communicate the results. This is a computer- and a project-based course in the style of Dierker’s Passion-Driven Statistics and modeled directly after the already-successful UNM Stat 427/527 Advanced Data Analysis 1 and 2 where I’ve piloted these learning strategies for advanced undergraduates and graduate students for four semesters.  Unlike my previous six-section intervention study showing active learning increases success by a third of a letter grade for everyone, this will be a pilot course developed for one or two sections. This implementation is just one of the many evidence-based recommendations I made as a 2016-17 Teaching Fellow for improving statistics education at UNM, including offering multiple versions (Stat Literacy with a first-year learning community, Stats for Research, Advanced Math-Stats); train/mentor our TAs prior to their teaching a course; offer a new Undergraduate Stat Ed Practicum course for all undergrad stat majors to serve as peer learning facilitators in at least one intro stat course; use multidisciplinary project-based learning to improve the outcomes of statistical interest, attitude, and confidence for under-represented minority students; and make other small changes such as moving the final from the first day of finals at 7:30 AM to a later time when students are shown to have greater success. A long-term goal is to hire a professor of practice in statistics for continued leadership and research in statistical education at UNM.
... more

UNM Stats R Package Development “R-Hack-a-Pack”

Workshop at The UNM Dept of Math & Stats on Friday 8/17/2018 10AM-5PM. Erik Erhardt
Please click this link to RSVP.
No workshop fee.  Food and caffeine contribution: $10-15. Math & Stat event link.
I’m going to host an R Package Development R-Hack-a-Pack one-day workshop on Friday 8/17 from 10-5.  This is like a “hack-a-thon”, but, instead of tackling a dataset analysis, the goal is to learn and use the skills to package R code.  The first hour or so will cover the basic ideas of packaging code using modern tools such as RStudio, devtools, and usethis.  The rest of the day is intended as a protected time where you can turn your code into a package. We’ll cover the basics of creating a package, package testing, writing vignettes, and using github (and CRAN) for version control and making your package available.
To get the most out of this workshop, bring a package idea to start on.  A few ideas:
  1. If you already have a set of functions that you load with script(“my_functions.R”), then you’re an afternoon away from making a great package.
  2. If you have a large script with repeated code, then you can start by turning the repeated code into functions, package those functions, and write a short vignette to perform the same analysis using your package.
  3. If you have an idea for a new package to develop, bring that idea with you and we can consider trying to develop it during the workshop.
  4. My project is to package all the code and data for my two-semester data analysis course while I’m not helping others.
Food and helper:
If you would like to volunteer to be a helper during the day for logistical issues, please email me directly.  It would be nice to have lunch and an afternoon coffee break with a snack.

... more

R package: RmdNameChunk

Enumerate Rmd code chunks

I wrote the RmdNameChunk package to automatically name the Rmd code chunks. This is important for my workflow because I don’t click “Knit” in RStudio, instead I run rmarkdown::render(fn). This has the advantage of using the console environment instead of the RMarkdown environment, so all the objects are available for manipulation in the console. However, it is hard to debug when there are scores of unnamed chunks. Now, I can easily name all the code chunk and can quickly identify where issues are. Install from github:


Install from source by running this command:
Read an Rmd file, update existing prefixed code chunks, and renumber.
  fn_in  = "test_in.Rmd"
, fn_out = "test_out.Rmd"
, prefix_chunk_name = "chunk-"
Review the input and output files to see how the chunk header names have been updated. Below is an example of the two Rmd files in the vignette. test_in.Rmd was read in and test_out.Rmd was created. The chunk headers are shown below from each file.
8 : ```{r setup, include=FALSE}
22 : ```{r cars}
28 : ```{r}
32 : ```{ r }
36 : ```{r, echo=FALSE}
40 : ```{ r, eval=FALSE}
44 : ```{r , eval=FALSE}
48 : ```{r chunk-2, eval=FALSE}
52 : ```{r chunk-XXX , eval=FALSE}
56 : ```{r chunk-XXX2 , eval=FALSE}
60 : ```{r chunk-XXX3 , eval=FALSE}
64 : ```{r chunk-XXX4 , eval=FALSE}
68 : ```{r chunk-XXX5 , eval=FALSE}
72 : ```{r chunk-XXX6 , eval=FALSE}
81 : ```{r pressure, echo=FALSE}
These code chunk headers were changed to those below:
8 : ```{r setup, include=FALSE}
22 : ```{r cars}
28 : ```{r chunk-01}
32 : ```{r chunk-02}
36 : ```{r chunk-03, echo=FALSE}
40 : ```{r chunk-04, eval=FALSE}
44 : ```{r chunk-05, eval=FALSE}
48 : ```{r chunk-06, eval=FALSE}
52 : ```{r chunk-07, eval=FALSE}
56 : ```{r chunk-08, eval=FALSE}
60 : ```{r chunk-09, eval=FALSE}
64 : ```{r chunk-10, eval=FALSE}
68 : ```{r chunk-11, eval=FALSE}
72 : ```{r chunk-12, eval=FALSE}
81 : ```{r pressure, echo=FALSE}

... more

On scientific writing

The resources below are helping me become a more disciplined writer capable of writing more first-author statistics papers. Since this is not an academic paper, I’m being loose about citation style but am including links, titles, and authors. The point is to write, not to stress about reviewing.

1 How to write a lot

Visiting my friend Jennifer in San Diego, I came across a book on her shelf that has motivated me to write more: “How to Write a Lot: A Practical Guide to Productive Academic Writing” by Paul J. Silvia. The main ideas that I took away from the book were well summarized in a University of Oregon post – “Becoming a Productive Faculty Writer – A Summary of Best Practices” – which also has a variety of helpful resources. The primary takeaways for me are:
  1. Write Daily. Write on a schedule and don’t move your writing for other meetings. Use phrases like “recurring intractable obligation” and “previously encombered temporal placement” to decline invitations.
  2. Have a Goal. Project goals, daily goals. Prewriting activities count.
  3. Stop at a Good Place. It gives you a better place from which to begin the next day. Jot down critical ideas to get started from.
  4. Limit Distractions. Shut the door and tune out the outside world.
  5. Take Care of Yourself. Eat well, sleep well, exercise well, and work well.

2 Writing scientific manuscripts

There is lots of harmonious advice for writing academic papers and getting these manuscripts through review and into publication. Below are the points of advice that resonated with me. My main conclusions are from these two sources (also Gelman): O’Connor’s algorithm overview is the order of parts to write that I’m using as a basis below.  Baldwin’s order is slightly different and indicated in each citation. [caption id="" align="aligncenter" width="240"]Overview of the formulation of a scientific manuscript. (O’Connor) Overview of the formulation of a scientific manuscript. (O’Connor)[/caption]

1. Figures/Tables

“Construction of first-draft figures and tables based on data is the critical first step toward preparation of an outline for the manuscript.” (O’Connor) “Paste the figures and tables on a wall in their approximate order of appearance. This will provide the skeleton from which to begin the construction of a more detailed outline and draft.” (O’Connor) “Write the first draft of figure legends. Make each legend’s opening sentence into a figure title to describe the variables compared.” (O’Connor) “The entire story of your paper should be comprehensible from this abstract and the figures and tables.” (2b. Baldwin) “Each figure should illustrate at least one important take-home message of your paper and ideally be understandable in 30 seconds to an uninformed scientific reader.” (Baldwin) Caption: “The first sentence should summarize the main point of the figure.” “The entire figures should be fully comprehensible from the figure caption.” “Table legends should include only a stand-alone first sentence.” (Baldwin) For more on figures, see our chapter in the 4th ed of the “Handbook of Psychophysiology”.

2. Summary Statements

“These important statements are conclusions summarizing the major contributions of the manuscript to the scientific community. Use short rigid statements usually containing cause/effect words.” (O’Connor)

3. Scientific Audience

Identify the scientific audience and journals. (O’Connor)

4. Materials and Methods

“Write the materials and methods section to supplement and explain the figure legends.” (O’Connor) “Write while you are still conducting experiments.” (1.+4. Baldwin)

5. Re-evaluate Data

“For each figure and table, make a note of which summary statement it addresses.” (O’Connor)

6. Results

“Once each figure and table has a legend describing the mathematical variables compared, then the first sentence of each results paragraph is simply the results of this comparison.” (O’Connor) “The Results section should highlight all of the conclusions that you can draw from your data.” (3. Baldwin)

7. Discussion/Conclusions

“Convert by logical arguments the relations of mathematical variables stated in the results section into mechanistic interpretations of cause and effect. Simply restate the data relation from each results paragraph and convert each to mechanistic conclusions.” (O’Connor) Table 1 (O’Connor) gives examples of results words for data relations vs. discussion words for logic and mechanism. “The discussion should start with a paragraph which succinctly states your motivation, and the conclusions that you draw from your data that do not require discussion and ends with an introduction to the weaker conclusions that you would like to draw, but do require discussion.” “The following paragraphs should discuss the conclusions that you would like to draw from your data, but require discussion because the inferences are indirect, or your data or the data in the literature are contradictory.” “The last paragraph should summarize all major conclusions from the discussion of your results and indicate future research directions.” (6. Baldwin)

8. References

This is taken care of by a reference manager with well-curated reference data and style files.

9. Introduction

“First, summarize the subject and review the literature to allow the reader to (i) understand the statements in the Results and Discussion, (ii) understand how the statements fit into the extant scientific body of knowledge, and (iii) Understand that the conclusions are indeed novel, the next step in the knowledge of the subject.” (O’Connor) “Write the last paragraph of the Introduction first; this should be an abbreviated road map of the question that you are addressing and the means by which you answered the question” (5. Baldwin) “Circle all of the words and concepts that you used in this last paragraph that need to be introduced and elaborated on in preceding paragraphs of the Introduction. In this way, you will be reverse-engineering the entire Introduction from your last paragraph.” (Baldwin) Remove the fluff.

10. Title

“The title should be a positive statement from the summary statements.” (O’Connor)

11. Conclusion Paragraph

“In this paragraph, restate the logical conclusions and explain why these conclusions are important, how they will influence future thinking in this and other fields. In the introduction, these conclusions were the next step. Now discuss the future based on the conclusions in this manuscript or an alternative path to further substantiate the validity of your conclusions. Also, state the relevance of results in the present manuscript to other fields.” (O’Connor)

12. Abstract

“Use the abstract in general terms to describe the most important points in the work.” (O’Connor) “Write a rough draft of the abstract … to create the roadmap of the logic of the results and conclusions that you will be developing.” (2b. Baldwin)

13. Revise, revise, revise.

Erase your memory of your writing and see it fresh.
  • Ask others to read it.
  • Read it after time has passed.
  • Have someone read it to you. (Baldwin)

3 Words and phrases

Thanks When you can’t find the phrase to get you started, start with “70 useful sentences for academic writing” by Luiz Otávio Barros.

4 Presentations

Use story structure in the first five slides to set up the scenario and characters in your heroic journey. Chapter 4 of Cliff Atkinson’s “Beyond Bullet Points” tells you how. Introduction:
  1. The Setting Headline (Where am I, and when is it?)
  2. The Role Headline (Who am I in this setting?)
  3. The Point A Headline (What challengee do I face in this setting?)
  4. The Point B Headline (Where do I want to be?)
    1. (The Gap Between A and B) (Why am I here?)
  5. The Call to Action Headline (How do I get from A to B?)
Chapter 5 was also helpful for structuring the remaining slides in a hierarchy of key points (sections) with explanations (subsections) and details (slides).

Key Point 1
Analysis 1
Fact 1
Fact 2
Fact 3
Analysis 2
Fact 1
Fact 2
Fact 3
Analysis 3
Fact 1
Fact 2
Fact 3

Key Point 2
Analysis 1
Fact 1
Fact 2
Fact 3
Analysis 2
Fact 1
Fact 2
Fact 3
Analysis 3
Fact 1
Fact 2
Fact 3

Key Point 3
Analysis 1
Fact 1
Fact 2
Fact 3
Analysis 2
Fact 1
Fact 2
Fact 3
Analysis 3
Fact 1
Fact 2
Fact 3

Conclusion (recap):
The Point A Headline (What challenges do I face in this setting?)
The Point B Headline (Where do I want to be?)
(The Gap Between A and B) (Why am I here?)
The Call to Action Headline (How do I get from A to B?)

... more


I’m enjoying Sabbatical during the Fall 2017 – Spring 2018 academic year.  My Sabbatical Leave Plan includes visiting both UC Irvine and the Mind Research Network to:
  • learn more about Bayesian graphical models,
  • learn more about Hamiltonian Monte Carlo (HMC),
  • learn about their statistical and computational implementations, and
  • apply both to extend current models in the application to fMRI brain imaging data.
  • Continue UNM 100-level statistics and mathematics education initiatives to understand factors influencing student success and find strategies to increase success.

... more

Paper published: In Vivo Inhibition of miR-155 Promotes Recovery after Experimental Mouse Stroke

In Vivo Inhibition of miR-155 Promotes Recovery after Experimental Mouse Stroke Ernesto Caballero-Garrido, Juan Carlos Pena-Philippides, Tamar Lordkipanidze, Denis Bragin, Yirong Yang, Erik Barry Erhardt, and Tamara Roitbak. The Journal of Neuroscience, 35(36), pdf, 12446-12464 Online: September 9, 2015 DOI: 10.1523/JNEUROSCI.1641-15.2015 Abstract A multifunctional microRNA, miR-155, has been recently recognized as an important modulator of numerous biological processes. In our previous in vitro studies, miR-155 was identified as a potential regulator of the endothelial morphogenesis. The present study demonstrates that in vivo inhibition of miR-155 supports cerebral vasculature after experimental stroke. Intravenous injections of a specific miR-155 inhibitor were initiated at 48 h after mouse distal middle cerebral artery occlusion (dMCAO). Microvasculature in peri-infarct area, infarct size, and animal functional recovery were assessed at 1, 2, and 3 weeks after dMCAO. Using in vivo two-photon microscopy, we detected improved blood flow and microvascular integrity in the peri-infarct area of miR-155 inhibitor-injected mice. Electron microscopy revealed that, in contrast to the control group, these animals demonstrated well preserved capillary tight junctions (TJs). Western blot analysis data indicate that improved TJ integrity in the inhibitor-injected animals could be associated with stabilization of the TJ protein ZO-1 and mediated by the miR-155 target protein Rheb. MRI analysis showed significant (34%) reduction of infarct size in miR-155 inhibitor-injected animals at 21 d after dMCAO. Reduced brain injury was confirmed by electron microscopy demonstrating decreased neuronal damage in the peri-infarct area of stroke. Preservation of brain tissue was reflected in efficient functional recovery of inhibitor-injected animals. Based on our findings, we propose that in vivo miR-155 inhibition after ischemia supports brain microvasculature, reduces brain tissue damage, and improves the animal functional recovery. SIGNIFICANCE STATEMENT In the present study, we investigated an effect of the in vivo inhibition of a microRNA, miR-155, on brain recovery after experimental cerebral ischemia. To our knowledge, this is the first report describing the efficiency of intravenous anti-miRNA injections in a mouse model of ischemic stroke. The role of miRNAs in poststroke revascularization has been unexplored and in vivo regulation of miRNAs during the subacute phase of stroke has not yet been proposed. Our investigation introduces a new and unexplored approach to cerebral regeneration: regulation of poststroke angiogenesis and recovery through direct modulation of specific miRNA activity. We expect that our findings will lead to the development of novel strategies for regulating neurorestorative processes in the postischemic brain.
... more

Paper published: Nasal vaccination of young rainbow trout (Oncorhynchus mykiss) against infectious hematopoietic necrosis and enteric red mouth disease

Nasal vaccination of young rainbow trout (Oncorhynchus mykiss) against infectious hematopoietic necrosis and enteric red mouth disease Salinas, I, EB Erhardt, and S LaPatra. Developmental & Comparative Immunology, 53(1), pdf, pp. 105–111 Online: June 23, 2015 DOI: 10.1016/j.dci.2015.05.015 Abstract Determining the earliest age at which farmed fish can be successfully vaccinated is a very important question for fish farmers. Nasal vaccines are novel mucosal vaccines that prevent aquatic infectious diseases of finfish. The present study investigates the ontogeny of the olfactory organ of rainbow trout by histology and aims to establish the earliest age for vaccination against infectious hematopoietic necrosis (IHN) and enteric red mouth (ERM) disease using the nasal route. Rainbow trout (Oncorhynchus mykiss) were vaccinated intranasally (I.N) at three different ages: 1050° days (DD) (group A); 450 DD (group B); and 360 DD (group C), or 70, 30 and 24 days post-hatch (dph), respectively. The mean weights of groups A, B and C were 4.69 g, 2.9 g and 2.37 g, respectively. Fish received either a live attenuated IHN virus vaccine, ERM formalin killed bacterin or saline (mock vaccinated). Fish were challenged to the corresponding live pathogen 28 days post-vaccination. IHN vaccine delivery at 360 DD resulted in 40% mortality likely due to residual virulence of the vaccine. No mortality was observed in the ERM nasal delivery groups. Following challenge, very high protection rates against IHN virus were recorded in all three age groups with survivals of 95%, 100% and 97.5% in groups A, B and C, respectively. Survival against ERM was 82.5%, 87.5% and 77.5% in groups A, B and C, respectively. Survival rates did not differ among ages for either vaccine. Our results indicate the feasibility and effectiveness of nasal vaccination as early as 360 DD and vaccination-related mortalities when a live attenuated viral vaccine was used in the youngest fish.
... more

Paper published: Multidimensional frequency domain analysis of full-volume fMRI reveals significant effects of age, gender and mental illness on the spatiotemporal organization of resting-state brain activity

Multidimensional frequency domain analysis of full-volume fMRI reveals significant effects of age, gender and mental illness on the spatiotemporal organization of resting-state brain activity Miller, RL, EB Erhardt, EA Allen, AM Michael, JA Turner, J Bustillo, JM Ford, DH Mathalon, TGM van Erp, S Potkin, A Preda, G Pearlson, and VD Calhoun (2015). Frontiers in Neuroscience. 9(203) pdf, 1–19. Online: June 16, 2015 doi: 10.3389/fnins.2015.00203 Abstract Clinical research employing functional magnetic resonance imaging (fMRI) is often conducted within the connectionist paradigm, focusing on patterns of connectivity between voxels, regions of interest (ROIs) or spatially distributed functional networks. Connectivity-based analyses are concerned with pairwise correlations of the temporal activation associated with restrictions of the whole-brain hemodynamic signal to locations of a priori interest. There is a more abstract question however that such spatially granular correlation-based approaches do not elucidate: Are the broad spatiotemporal organizing principles of brains in certain populations distinguishable from those of others? Global patterns (in space and time) of hemodynamic activation are rarely scrutinized for features that might characterize complex psychiatric conditions, aging effects or gender—among other variables of potential interest to researchers. We introduce a canonical, transparent technique for characterizing the role in overall brain activation of spatially scaled periodic patterns with given temporal recurrence rates. A core feature of our technique is the spatiotemporal spectral profile (STSP), a readily interpretable 2D reduction of the native four-dimensional brain × time frequency domain that is still “big enough” to capture important group differences in globally patterned brain activation. Its power to distinguish populations of interest is demonstrated on a large balanced multi-site resting fMRI dataset with nearly equal numbers of schizophrenia patients and healthy controls. Our analysis reveals striking differences in the spatiotemporal organization of brain activity that correlate with the presence of diagnosed schizophrenia, as well as with gender and age. To the best of our knowledge, this is the first demonstration that a 4D frequency domain analysis of full volume fMRI data exposes clinically or demographically relevant differences in resting-state brain function.
... more