Tagged Questions

{statistics} if for questions related to statistics software/graphics/packages and TeX.

14 views

Legend of several linear regression lines in the same axis [duplicate]

I am using linear regression in PGFPlots for fit several lines. It legend show correctly if each line is on its own tikzpicture. Code: \documentclass[tikz]{standalone} \usepackage{tikz,pgfplots,...
84 views

Multiple graphs in tikzpicture

I am trying to draw the picture below. The four graphs are each a density probability function; the distribution in case 1 and case 2 is unimodal, in case 3 it's normal, and in case 4 it's bimodal. ...
130 views

Is it possible to user-define the percentages for lower/upper whisper in boxplot of PGFPlots?

According to Section 5.12.1 of the manual of PGFPlots; Revision 1.13 (2016/01/06), boxplot visualizes (see Page 472): Median is the 0.5–quantile of the input data. Lower quartile is the 0.25–...
75 views

Problem setting number formatting in Table output after using estadd/esttab

I'm trying to create a Table using the esttab command and since I want to add a scalar I do it using the estadd command. The scalar is generated successfully but once I create the Table, some of the ...
381 views

drawing the mean in a pgfplot

I would like to add a straight line to a pgfplot that indicates the mean of the data. For a histogram, this should be a vertical line; for a simple plot, a horizontal line. Now, I do get as far as in ...
1k views

how to represent estimated variance in LaTeX

How would I represent the estimated variance symbol in LaTeX: i.e, \Var(\tau) for Var(τ) . But how to write with an inverted V symbol above the Var, basically the symbol for estimated variance
102 views

Automated correlation table labels each variable with a number in the first column

I would like to generate an automated correlation table with both summary statistics and correlations with asterisks. More importantly, due to a large number of variables and variables with long names,...
146 views

Longtable integration Stata

As far as I am aware, the available commands that produce LaTeX-formatted tables of stored estimates using Stata, will only produce tables using either the table or tabular environments. Do any other ...
162 views

Regression Functions and Variable Names

I would like to present a regression function in my LaTeX Document that includes actual variable names from my (Stata) code as its covariates. This screenshot gives an example of what I want it to ...
175 views

Displaying mediator analysis with LaTeX (TikZ-pfg maybe?)

I want to "draw" a mediator analysis with LaTeX, e.g. with TikZ. Unfortunately, I did not find any template for such a graphic; plus, I am lacking of skill to do it on my own (but very willing to ...
2k views

Symbol for not conditionally independent

I have previously used some code from here to produce a symbol to represent the conditionally independence of some variables. Does anyone know a method for generating a symbol for not conditionally ...
126 views

Displaying significance level across three columns

I have data from an experiment composed of three treatments, A, B, C. I watn to show in a compact way in a table the result of statistical tests (say, t-test) f A/B, A/C, and B/C. This is an example ...
34 views

How do you display words, not variables, in equations in LaTeX? [duplicate]

In particular, I need to display the following: P(success) = size of successful region/size of possible region But with a nice divisor line for the fraction. If I just enter this in typical fashion ...
144 views

General way to split a line by a rule of thumb and displaying results

The following is to construct illustrations for concepts of frequency of a properly sampled outcome if any such frequency exists. Doing such illustrations is tedious and liable to error by hand ... so ...
574 views

Hierarchical statistical diagrams

I would like to create a diagram like the one below in LaTeX (probably with TikZ). This diagram and others can be found on this website. It looks like it was made with LaTeX, but I am not entirely ...
807 views

Poisson distribution with tikzpicture

I am new to 'drawing' in LaTeX with pgfplots, tikz, etc. I am trying to plot a Poisson distribution with varying means. Here is what I have tried (based on this answer) \documentclass{article} \...
1k views

Filling in the area under a normal distribution curve [duplicate]

I'm trying to fill the area between the two $z$-scores but I'm not having any luck. Could someone please help me with this? \begin{tikzpicture} \begin{axis}[ no markers, domain=0:6, samples=...
2k views

How to write partial eta square in LaTeX?

Problem: Writing partial eta square in LaTeX. I couldn't find anywhere online giving guidance to this statistic symbol. Example (it's the symbol to the left): Any help would be appreciated.
693 views

histogram + frequention polygon

This is my code \documentclass[11pt,a4paper]{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetikzlibrary{calc,intersections,through,backgrounds,snakes} \usepackage{pgfplots} \pgfplotsset{...
1k views

TikZ: Regression Line with Residuals

Desired Output I made this diagram in R with ggplot2. Now I want to reproduce this diagram with Tikz. My MWE is: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \...
129 views

how to generate document statistics?

In another question, manual steps are explained to implement stats. Due to a deadline and for some convenience, is there a package that generates document stats without many modifications in several ...
247 views

LaTeX typeset multiple comparisons

I originally asked this question on Stack Overflow, but was advised to also ask here... So, here goes! I'm teaching an applied stats course and was wondering whether anyone can advise me on how to ...
7k views

Linear regression - trend line with pgfplots

I am trying to display a trend line with pgfplots. I followed the instruction in the manual and looked around. I though I had implemented it correctly, but there is no regression line, and although ...
950 views

pgfplots - draw boxplot without outliers

I am creating a boxplot with pgfplots, using the builtin statistics library. I load the input data from a table file. \usepackage{pgfplots} \usepgfplotslibrary{statistics} ... \begin{tikzpicture} \...
1k views

Create image from statistical data automatically

I am looking for a way to automatically create images like the one below: There is no MWE because all I have, for now, is this image (created, I believe, by SPSS, but I have nothing to do with that ...
1k views

How to typeset statistical distributions [closed]

What is the consensus way to typeset statistical distributions? For the normal distribution I have seen all of: $X\sim N(\mu,\,\sigma^{2})$ $X\sim\mathrm{N}(\mu,\,\sigma^{2})$ \$X\sim\mathcal{N}(\mu,...
1k views

Sweave and Matrix

I am using xtable to generate Matrices x1mean <- matrix(c(204.5, 556.5), 2) x2mean <- matrix(c(130.0, 355.0), 2) x1mmat <- xtable(x1mean, align = rep( "", ncol(x1mean) + 1) ) x2mmat <- ...
998 views

Count in document used source references

I currently gathering some statistical information about my thesis for reporting purposes. One metric I want to determine is how many sources I have referenced. I have a BibTeX file with more than 150 ...
7k views

How to design a 3D donut pie chart with pgf-plot?

It seems that pgfplots users don't like pie charts but sometimes we can't go without (for some reasons). So I was wondering if there was a way to make what is called a donut chart. For example one ...
968 views

Extract document statistics? - How many pages has chapter xy? Count fixmes?

I have a large pdflatex document where each chapter is located in an extra text file and included with \include{chapter3.tex} ... How can I extract the page numbers of each chapter and write them ...
569 views

Problem in StatWeave

I visited http://www.stat.uiowa.edu/~rlenth/StatWeave/ and installed StatWeave according to the instructions. But my problem is that there are no Step by Step instructions given in the manual, and ...
1k views

Is there a simple way to obtain the statistic data of the document being typeset?

I want to put the statistic data of my book in a certain page right after the title page but before "This book is presented to my kittens..." page. The statistic data includes: The total number of ...