Showing 109 to 112

Pooling

#statistics

In McElreath's literature, he talks about pooling of information which is a benefit of multilevel models.

First, there are usually some parameters, such as σ, that the model says do not depend in any way upon an African identity for each nation. By splitting the data table, you are hurting the accuracy of the estimates for these parameters, because you are essentially making two less-accurate estimates instead of pooling all of the evidence into one estimate. In effect, you have accidentally assumed that variance differs between African and non-African nations. Now, there’s nothing wrong with that sort of assumption. But you want to avoid accidental assumptions.

Created (3 years ago)

Portal: Rhetoric

Since antiquity, #rhetoric has been a well-taxonomised field. This makes it amenable to memorization techniques and mind mapping.

See:

Enthymeme🔗

Enthymeme, what is it? A Dark Art. Aristotle called it the body/core of rhetoric but did not define it well. One way to see it: It's like a syllogism, but you leave out one of the premises, letting the audience's doxa fill it in. Doing this is often more impactful, bypassing filters that would otherwise be triggered.

There are four types of enthymeme.

  1. Syllogism with an unstated premise
  2. Syllogism based on signs
  3. Syllogism where the audience supplies a premise
  4. Visual enthymemes
    • Pictures can also function as enthymemes because they require the audience to help construct their meaning.

The classic syllogism

  1. Humans are mortal
  2. Socrates is a human
  3. Socrates is mortal

One enthymematic version is the truncated syllogism, "Socrates is mortal because he's human", leaving out "humans are mortal". The audience is assumed to understand this.

A valid syllogism:

  1. All men are good drivers
  2. Rune is a man
  3. Rune is a good driver

Of course, if you don't accept the first premise, you needn't accept the conclusion as true.

Another enthymeme: "Candide is a typical French novel; therefore it is vulgar". You rely on the audience to already think it sounds reasonable that typical French novels are vulgar.

An enthymeme that bypasses filters: "Hela personalen består av ungdomar som knappt är torra bakom öronen, så det går inte fort med servicen om man säger så." The implied premise, that all teenagers are slow, is so categorical that were it said explicitly, even the most teenager-hostile would protest its validity. What's concerning is that none in the audience might actually agree with the premise, but it passes, and it might reinforce the audience's image of teenagers as slow workers.

Paradeigma

Doxa🔗

Ideer som vi i ett samhälle eller en grupp implicit har antagit gemensamt. Värdegrunder är ett slags doxa, och allmänt erkända fakta som att jorden är rund ingår också i vårt doxa.

Kairos🔗

Pisteis🔗

If anyone wanted to persuade based on pure logic, it would be the philosopher Aristotle. And yet Aristotle’s remarks are extraordinary. Ethos, he says, is almost the whole of persuasion. And he narrows ethos down to exactly three things: the speaker’s phronesis (practical wis- dom), arête (moral virtue), and eunoia (goodwill). Aristotle insists that any rhetor who wants to be trusted must be seen to possess these three attri- butes, and with these three, the speaker cannot help but be persuasive.

Rhetors often make the mistake of assuming their credibility before an audience. Bad idea. Aristotle goes so far as to say that one’s ethos, rather than existing within the person, is established by the speech itself: “This kind of persuasion, like the others, should be achieved by what the speaker says, not by what people think of his character before he begins to speak.” In other words, you may have a good reputation, but if you don’t draw upon it verbally, it just sits by uselessly.

Ethos🔗

Logos🔗

Pathos🔗

Semiotics🔗

Visuell retorik

Roland Barthes 1976 pratar om textens förankrande relation till bilden [anchrage]. Det kan tolkas som att han inte riktigt litar på bildens egen förmåga att förmedla ett innehåll, som om den kunde tolkas lite hur som helst, medan språket ger säker info. Men så är inte fallet. Bild har egna betydelser vid sidan av och tillsammans med ev skriftspråklig info.

Semiotics also seems to related to Critical theory.

Techne

Art, skill. The art of doing something. Contrast with episteme.

Moesis

Created (3 years ago)

ANOVA vs regression

#statistics

Thanks to this article, I started to get it. Here's my re-explanation.

ANOVA is one of many ways to carry out linear regression. It is in many ways a shorthand, and it's limited to work only with categorical variables.

Consider the simple linear regression with two predictors

Yi = β0 + β1 X1i + β2 X2i + εi

which in the R language may correspond to the function call lm(Y ~ X1 + X2). Sidenote: the full model hasn't been specified yet, such as chosen assumptions, so it could better correspond to glm(Y ~ X1 + X2) or some other function invocation depending on your theory.

Now consider the ANOVA model with two predictors, written like this:

Yijk = μ + αj + βk + εijk

Hopefully you know regression well enough that I don't have to explain the earlier regression equation; the real secret is here, in the ANOVA notation. Key insights:

  • X1 and X2 are present, just not written!
  • μ is the grand mean.
  • εijk is the residual for individual i who is in treatment j and group k.
  • In preparation for ANOVA, you usually have to mutate X1 and X2 (change the dataset) because they must be effect-coded, while for regression they are often dummy-coded.
    • Effect-coded means that the categories are coded with 1’s and -1 so that each category’s mean is compared to the grand mean.
    • Dummy-coded means that each category’s intercept is compared to the reference group‘s intercept.

In dummy coding, if X1 is gender, a value of X1i = 0 might mean that individual i is female, and a value of 1 that they are male, so β1 becomes the mean effect of maleness as opposed to femaleness.

In effect coding, female would instead be coded as -1 and male 1. Recognize now that there exist two coefficients αj, though we don't write α-1 and α1, but α0 and α1, or if you prefer, αf and αm.

Q: But what does that mean, what is α1 if not the mean effect of maleness as opposed to femaleness?
A: Well, the implication of leaving femaleness a default state means that they are included in the group mean, that is, the female assumption is baked into the regression intercept β0, where this is not the case for the ANOVA group mean μ. That is how β0 ≠ μ.

In a given instance of calculation, individual i is known to belong to either group j=0 or j=1, so for that individual we employ either one of the following formulas. For clarity, we show the X variables here.

Yi0k = μ + α0 X1i + βk X2i + εi0k
Yi1k = μ + α1 X1i + βk X2i + εi1k

Pay attention! The 0 and 1 subscripts in X1 and X2 are not the same here as the 0's and 1's elsewhere. This may be why we generally don't like to write out X1 and X2, it gets too confusing. I think in some textbooks they use Roman numerals sometimes?

Now, dummy coding is a bit easier to grasp because you don't need to think of α as a vector {α0, α1}, the regression coefficient β1 is literally just a scalar, a single value. Going down the list of individuals from i=1 to i=n, the formula is the same every time. In carrying out ANOVA, the formula keeps changing cause there is not just a vector of individuals i ∈ {1, 2, 3, … n} to iterate through, there is a vector of means αj ∈ {α0, α1} and another vector of means βk ∈ {β0, β1}.

It might not be clear what is the benefit of designing the calculation this way, when it seems just as good to have dummy coding, but it becomes apparent when you realize you can grow these vectors to any size. Perhaps βk ∈ {β0, β1, β2, β3, β4}. That would be a bit inconvenient to do with dummy coding – you would need four new terms in the formula.

Of course computers can take care of that behind the scenes, so perhaps ANOVA is a relic from the pen-and-paper era.

A gotcha: It's worth observing that in ANOVA, i does not go from i=1 to i=n as you are used to. Consider what I said before: "εijk is the residual for individual i who is in treatment j and group k". So does that mean there is a data row for individual i=40 in treatment 0 and group 0, and another data row showing that same individual i=40 in treatment 1 and group 0? Of course not. Instead, i refers to your indice inside the group. You might be person i=7 in treatment 0 and group 0, different from person i=7 in treatment 1 and group 1. If there are two treatments and two groups, there are four combinations, and we split the overall index 1:N (we write capital N where ordinary regression is content with lowercase n) into four indexes, each 1:n. where n may simply be N/4 (or is it N/2?) or the groups could be of differing sizes, so that you have several group sizes {nα, nβ} but they must of course add up to the overall sample size N.


We're not done yet, but take a break! Stretch your legs.


Let's spit out some analyses! Taken from this article.

Here's a linear model which we will run as both ANOVA and ordinary regression:

Experience ~ Employment

The Employment variable is categorical, the categories being either "Clerical", "Custodial" or "Manager". The Experience variable is job experience in months (numeric, not categorical – the outcome is never categorical).

If we run this as an ANOVA model, we find that the means of the three groups are:

Clerical:   85.039
Custodial: 298.111
Manager:    77.619

If we run this as a regression, we find these coefficients:

Intercept:  77.619
Clerical:    7.420
Custodial: 220.492

What can you observe? Stop reading and try to answer, then read on.


  1. First, what do the numbers mean? They are job experience in months – as I said, but it's too easy to skim or forget that.
  2. The fact that the Intercept is identical to the Manager effect is an artifact of the fact we only have one dependent variable, so it's responsible for the whole contribution to μ.
  3. The regression Intercept + Clerical is equal to ANOVA Clerical.
  4. The regression Intercept + Custodial is equal to ANOVA Custodial.

By the way, what are the equivalents to μ etc? Once again,

ANOVA

Clerical:   85.039     call this alpha1
Custodial: 298.111     call this alpha2
Manager:    77.619     call this alpha0

Regression

Intercept:  77.619      call this beta0
Clerical:    7.420      call this beta1
Custodial: 220.492      call this beta2

I noticed after the fact there is no μ above, seems it is an artifact of the printout (the article did it in SPSS), as I guess the calculation should have had a nonzero μ. Still, try it yourself with any dataset.


In ANOVA, you test H0: μ1 = μ2 = μn.

If you are testing for the means of two samples, a T-Test could be the right statistical test. What if you have multiple groups? Instead of running multiple pairs of T-Test you can use an ANOVA, allowing to test for equality of their means all in one shot.

Running multiple pairs of tests increases your chance of type I error. For example, if you run 3 different hypothesis tests using a 95% confidence on each, your total confidence ends up being 0.857 (.95 raised to the third). Running an ANOVA will maintain your desired confidence level.

Created (3 years ago)

Why do we resample?

#statistics

In real life, sample points have real costs, so sampling from the true distribution is, at best, expensive, and at worst, impossible. So, it's the money. The bootstrap is mostly free.

As @NickCox puts it with exceptional visual aplomb:

You wouldn't relaunch the Titanic and crash it into another iceberg

Because, you know, that would be expensive (in many, many ways).

I understand that it is usually very expensive to get fresh samples, but assuming we have access to a generator of the original distribution, does it still make sense to re-sample due to some theoretical reasons?

No. If it's free to sample from the population distribution, you should do so.

stats.stackexchange.com/questions/191246/why-do-we-resample-in-bootstrap-estimation

Created (3 years ago)
Showing 109 to 112