Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [statistics]

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

2
votes
1answer
41 views

pgfplots: How to draw boxplot pairs separated in two y axis?

The user Korijn has posted a nice approach on how to create pairs of boxplots which are belonging to each other. Minimum Working Example (MWE): \documentclass[border=2mm]{standalone} \usepackage{...
0
votes
0answers
25 views

Table does not use entire space of page! [duplicate]

My table cannot fit on one page. If I could only split the table up over two pages or maybe make it start in the very top of the page instead of beginning the table in like the middle of the page then ...
4
votes
1answer
1k views

What font is “z” in “z-score”?

I noticed that the letter z is different from other font. Is there any special command for this?
-1
votes
1answer
55 views

Normal multivariate standard TIKZ [closed]

I need to perform this graph in TIKZ, there is no need to be equal, it is to be approximated.
0
votes
1answer
29 views

Lines of code counter

Is there a way to automatically count the lines of code of a TeX document? And if yes, is there a way to include that in the document? I would like to have something like "this document is n lines of ...
1
vote
0answers
99 views

pgfplots Histogram with Curves [closed]

Variations on this question have been asked many times before, but I have not been able to find a working solution. The closest I have seen are discussions on other stackexchanges concerning how to ...
1
vote
0answers
97 views

pgfplots Histogram with Automatically Calculated Percentage Bins

I have a CSV file. The CSV file contains several columns. I want to plot a histogram that displays: As the x axis: bins for the percentage of rows, that can be changed; As the y axis: the cell ...
1
vote
1answer
85 views

pgfplots Line Histogram

I have a histogram. It is created from data in a CSV file. I would like to connect the mid points on each bar with a smooth line. My intention is to plot multiple series and show just the lines. ...
1
vote
1answer
61 views

pgfplots Histogram with Normal Curve

Variations on this question have been asked multiple times before, but I have been unsuccessful in getting them to work. I may be (and most likely am) just inept at statistics. I wish to plot a ...
1
vote
1answer
79 views

Combine boxplot and histogram in one diagram (PGF/TikZ)

For my bachelor thesis I did a questionnaire, now I want to evaluate and visualise it in a diagram, combining multiple values. Most of the answers from this survey are in a scale of 1-5 or 1-6. I want ...
2
votes
1answer
179 views

How to properly draw a histogram?

Surely it is an easy problem but I can't find a solution. Imagine you want to simulate a Gaussian distribution of frequencies around a mean value with a certain spread. It is an easy task to write the ...
0
votes
1answer
194 views

Cannot find package stata.sty [duplicate]

I am using the command texdoc on stata to generate LaTex code. However, whenever I try running the code using pdfLaTex on TexWorks, I get an error saying that the package stata.sty could not be found ...
0
votes
1answer
105 views

Include average in boxplot

I would like to include an average into my boxplots. The boxplots are made using https://tex.stackexchange.com/a/183856/164280 as an example. I have seen in How to show the mean or average value on a ...
1
vote
1answer
55 views

Dimension too large for a boxplot with pgfplots

I can not display the tick marks on the x-axis. \starttikzpicture \startaxis[ y=1.5cm, axis y line=none, axis x line=bottom, enlarge x limits, ...
4
votes
1answer
264 views

“Undefined control sequence” Regression table from Stata

I am completely new to LaTeX. I work in the TeXworks editor. I would like to create regression tables with results from Stata for my master's thesis. Using the Stata command "esttab", I created a .tex ...
2
votes
0answers
88 views

notational conventions for statistics (like hypothesis test statistics) [closed]

I am wondering about something. I know I should write function non-italic. like sin and cos, But I am not sure if test statistic symbols like $T^2$ should be written italic (default) or with \mathrm. ...
1
vote
2answers
569 views

plot and annotate chi square distribution

My question is replacing Gaussian distribution with chi square distribution in following codes. So it should show a chi-square distribution instead of a normal distribution. Thanks in advance. \...
1
vote
1answer
269 views

PGFPlots Line of Best Fit Scale and Inversion Error

I am attempting to draw a linear regression line on my graph using pgfplotstable. However, for some reason, it appears to be calculating the regression three orders of magnitude too large and inverted,...
0
votes
1answer
157 views

Interval missing and extrange behavior in frequency polygon

I am preparing a material for students about Statistics and I have this generic-foo frequency polygon as an example, without the corresponding Histogram. I would like all intervals to be displayed in ...
0
votes
0answers
287 views

How to plot linear histograms with Latex? [duplicate]

I have been reviewing how to plot a line histogram on data of my results. I have searched and only see how to plot in bar histogram, but I have not seen any construction of one of lines in latex. I ...
2
votes
0answers
387 views

How do I create a weighted histogram from a data file using pgfplots?

There is already a question with a good answer on how to create a histogram from a data file: How to compute an histogram (plot bars) binning the values from a .csv using TeX? I am in a similar ...
2
votes
1answer
360 views

box plot statistic with 2 lines

I am trying to have a boxplot from data , with two lines and frequency in the second line. example: I don't know how to do it, with a "foreach " or special command for boxplot ( pgfplots ) \...
3
votes
2answers
169 views

How to add Statistical mode in an equation?

I need to include an equation that contain Statistical mode.I need to find the most repeated value in a set and also need to include range of that set.In the equation bellow,i am trying to replace max ...
0
votes
1answer
805 views

Including greek letters when saving matrix from R to .tex table

How does one save a table with Greek letters in R, so that LaTeX recognizes and outputs the Greek letters when the table is called in LaTeX ? I am using R to output a table of results, save the ...
1
vote
0answers
3k views

Personalizing esttab results - Stata and LaTeX [closed]

I am using Benn Jan's esttab command for Stata and combining the results with my draft LaTeX document, using the useful tips provided by Jörg Weber. I want to include some non-standard results in my ...
2
votes
1answer
2k views

Stata output directly to Latex

I am looking for a best, most universal option to transfer stata output to latex (of any kind) i know esttab and things like this however what if i want to transfer something different (any type of ...
2
votes
0answers
120 views

PGFPlots: BoxPlot of a statistic table with absolute frequency

Here is my problem. I have data in a statistic table with value / absolute frequency like this: \pgfplotstableread{ 1 1 2 2 3 6 4 10 5 6 6 ...
2
votes
1answer
2k 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. I ...
2
votes
1answer
238 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–...
0
votes
1answer
2k 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 ...
8
votes
1answer
2k 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 ...
2
votes
2answers
7k 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
1
vote
1answer
895 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 ...
2
votes
1answer
806 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 ...
1
vote
1answer
832 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 ...
4
votes
3answers
8k 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 ...
4
votes
3answers
146 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 ...
1
vote
0answers
56 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 ...
5
votes
2answers
169 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 ...
7
votes
3answers
974 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 ...
5
votes
1answer
2k 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} \...
11
votes
3answers
3k 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=...
3
votes
1answer
5k 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.
6
votes
3answers
1k 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{...
12
votes
2answers
2k 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} \...
1
vote
0answers
192 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 ...
8
votes
1answer
509 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 ...
8
votes
2answers
15k 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 ...
6
votes
3answers
2k 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} \...
12
votes
5answers
2k 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 ...