Paul Offit's Vaccines course

People in my research group have been understandably excited about, eg, Andrew Ng’s online machine learning course (you can also do Natural Language Processing with Dan Jurafsky and Chris Manning, respectively co-authors of Speech and Language Processing and Foundations of Statistical Natural Language Processing, so you need never choose between NLP textbook authors again).

Since submitting my PhD — I never mentioned that here, sorry, but if you follow me anywhere else you’ve probably heard! It’s under examination presently — I’ve zoned out some and eventually decided to head on over to Coursera and see what was on offer, in case I went two weeks without computer science and had withdrawal I guess. There’s nothing that exactly lines up with my desired enrollment dates right now, so instead, I’m in Paul Offit’s Vaccines course, starting June 25. Looking forward to it! Apparently there will be “challenging” assessment quizzes: I’m hoping to write up anything particularly interesting that comes up in the course, although I suspect that for people familiar with Offit’s various books and lectures (I’m not) it may be something of a repeat.

Note: never say never I guess, but anti-vax comments are unlikely to be published.

Useful LaTeX packages: linguistic examples

This is the conclusion of a short series of entries on LaTeX packages I found useful while preparing the examination copy of my PhD thesis.

Today’s entry is a package for displaying linguistic examples (ie, samples of text which you then want to discuss and analyse).  The LaTeX for Linguists Home Page is a good general resource for linguists and computational linguists using LaTeX. I discuss gb4e here because I had to do some messing around to get it to display example numbers the way I want (and the way my supervisor wanted: he likes in-text references to look like “example (4.1)” rather than “example 4.1”), and to get it to work with cleveref, and no one seems to have written that up to my knowledge.

gb4e

gb4e is a linguistic examples package.

usepackage{gb4e}

Input looks like:

begin{exe}
ex This is an example sentencelabel{example}
ex This is another example sentence.
end{exe}

This is a cleveref reference to cref{example}.
This is a normal reference to example (ref{example}).

You can mark sentences with * and ? and so on:

begin{exe}
ex[*] {This is an sentence ungrammatical.}
ex[?] {This is an questionably grammatical sentence.}
end{exe}

You can do sub-examples:

begin{exe}
ex This is an example.
ex
begin{xlist}
ex This is a sub-example.
ex This is another sub-example.
end{xlist}
end{exe}

A few things to do to make gb4e play really nicely. First, some cleveref config. gb4e doesn’t yet automatically tell cleveref how to refer to examples, so you need to tell it that the term is “example”, and second, if you want braces around the number (“example (1.1)” rather than “example 1.1” you need to tell it to use brackets:

% tell cleveref to use the word "example" to refer to examples,
% and to put example numbers in brackets
crefname{xnumi}{example}{examples}
creflabelformat{xnumi}{(#2#1#3)}
crefname{xnumii}{example}{examples}
creflabelformat{xnumii}{(#2#1#3)}
crefname{xnumiii}{example}{examples}
creflabelformat{xnumiii}{(#2#1#3)}
crefname{xnumiv}{example}{examples}
creflabelformat{xnumiv}{(#2#1#3)}

Also, by default, the gb4e numbering does not reset in chapters. That is, your examples will be numbered (1), (2), (3) etc right through a thesis. You probably want more like (1.1), (1.2), (2.1), (2.2), ie chapter.number. Change to this with the following in your preamble:

% Store the old chapter command so that
% our redefinition can still refer to it
letoldchapterchapter
% Redefine the chapter command so that it resets the
% 'exx' counter that gb4e uses on every new chapter.
renewcommand{chapter}{setcounter{exx}{0}oldchapter}

% Redefine how example numbers are shown so that they are
% chapter number dot example number
renewcommand{thexnumi}{thechapter.arabic{xnumi}}
You could also get it to reset in sections by replacing chapter and thechapter with section and thesection in the above.

Thanks to the TeX Stack Exchange community for their help with this. See Section based linguistic example numbering with brackets for more information.

Useful LaTeX packages: within document references

This is part of a short series of entries on LaTeX packages I found useful while preparing the examination copy of my PhD thesis.

Today’s entry is packages relevant to preparing within document references. These are both fairly new to me, although not absolutely now.

hyperref

This package turns cross-references and bibliography references into clickable links in your output PDF (at least if you generate it with xelatex or pdflatex), without you having to do anything other than the ref (or cleveref’s cref) and cite and so on commands.

usepackage{hyperref}

You will probably want to modify its choice of colours to something more subtle:

usepackage[citecolor=blue,%
    filecolor=black,%
    linkcolor=blue,%
    % Generates page numbers in your bibliography, ie will
    % list all the pages where you referred to that entry.
    pagebackref=true,%
    colorlinks=true,%
    urlcolor=blue]{hyperref}

Use black if you want the links the same colour as your text.

One note with hyperref: generally it should be the last package you load. There are occasional exceptions, see Which packages should be loaded after hyperref instead of before?

cleveref

cleveref is a LaTeX package that automatically remembers how you refer to things. So instead of:

see chapter ref{chapref}

you use the cref command:

see cref{chapref}

It handles multiple references nicely too:

see cref{chapref,anotherchapref}

will generate output along the lines of “see chapters 1 and 2”.

Use

Cref{refname}

to generate capitalised text, eg “Chapter 1” rather than “chapter 1”

To use it:

usepackage{cleveref}

It shortens the word “equation” to “eq.” by default, if you don’t like that, then:

usepackage[noabbrev]{cleveref}

For some packages that don’t yet tell cleveref how to refer to their counters, you will get output like “see ?? 1” rather than “see example 1”. You use the crefname command in the preamble to tell it what word to use for each unknown counter, examples of crefname will be shown tomorrow for gb4e.

Useful LaTeX packages: tables and figures

This is part of a short series of entries on LaTeX packages I found useful while preparing the examination copy of my PhD thesis.

Today’s entry is packages relevant to preparing tables or figures. Again, some are pretty widely known and some aren’t.

rotating

If you have a big table or figure that should be rotated sideways onto its own page:

usepackage{rotating}

And then you can replace the table and figure commands with:

begin{sidewaystable}
%Giant table goes here
end{sidewaystable}
begin{sidewaysfigure}
%Giant figure goes here
end{sidewaysfigure}

dcolumn

The dcolumn package produces tabular columns that are perfectly aligned on a decimal point (ie all the decimal points in that column are exactly underneath each other), which is usually how you want to display decimal numbers.

usepackage{dcolumn}

% create a new column type, d, which takes the . out of numbers, replacing the .
% with a cdot and aligning on it.
newcolumntype{d}[1]{D{.}{cdot}{#1}}

Now that you have defined the column type, you can use d in the tabular environment, where the numeric argument is the number of figures to expect after the decimal point. You don’t have to use exactly that number of figures in every entry, just that that’s how much room it will leave.

% a tabular enviroment with a 1 and 3 figures after the decimal point column
begin{tabular}{d{1}d{3}}
1.6 & 1.657
\
2.0 & 6.563
\
7 & 6.26
\
end{tabular}

One annoying aspect of this package is that for the headers of that column, which probably aren’t numbers, you will need to use multicolumn to get them to display nicely.

% a tabular enviroment with a 1 and 3 figures after the decimal point column
begin{tabular}{d{1}d{3}}
multicolumn{1}{c}{Heading 1} & multicolumn{1}{c}{Heading 2}\
1.6 & 1.657
\
2.0 & 6.563
\
7 & 6.26
\
end{tabular}

You can mix the d column type with the usual l, r and p column types.

threeparttable

You can’t use footnote in a floating table. This is one of several packages that allow table footnotes in various ways.

usepackage{threeparttable}

threeparttable doesn’t cause tables to float on its own, so you usually want to wrap in a table command:

begin{table}

begin{threeparttable}

% Normal bits of your table go here, and use tnote{a} and
% tnote{b} and so to generate a note mark

begin{tablenotes}
tnote General note
tnote General note 2
tnote[a] Note for mark a
tnote[b] Note for mark b
end{tablenotes}

end{threeparttable}

caption{Caption goes here}
end{table}

Unfortunately you need to generate the a, b, c (or whatever) numbering manually.

The general tnote entries are useful for things like “Bold entries are highest in the column”, so that they don’t need to go in the caption.

Useful LaTeX packages: bibliography

I’m going to post a short series of entries on LaTeX packages I found useful while preparing the examination copy of my PhD thesis. Largely this is just so that there’s a reference if my wiki page goes away, but also because I think many people use LaTeX the way I use it, that is, I got wedded to a bunch of packages 10 years ago and never really looked around for more recent stuff.

Today’s entry is a pretty slow start: the bibliography packages I used are pretty standard.

natbib

This is one of the most sophisticated and widely used packages for Harvard-style references (ie, “(Surname, Year)” rather than “[1]” style references).

usepackage[round]{natbib}
bibliographystyle{plainnat}

Inside your text use citep for a reference in parentheses “(Surname, Year)”, and citet for a in-text reference “Surname (Year)”. Its important to note that the plain cite command is equivalent to citet, which you may not expect.

You can use citeauthor to get just “Surname” and citeyear to get just “Year”.

bibentry

This is a useful add-on to natbib, which allows you to insert full bibliography entries into the body of your text. This is useful in the declaration portion of a thesis (where you say something like “this thesis incorporates revised versions of the following published articles”).

usepackage{bibentry}
nobibliography*

Then later on when you want to insert a full bibliography entry into the middle of your text:

bibentry{citationkey}

Getting a passport in Australia

See Lindsey Kuper on a expedited US passport, here we have another “life in Australia” comparison piece.

Step 1: obtain passport form. If you are an adult renewing an existing adult passport that has been expired for less than 24 months, you can do this online. Otherwise, obtain form from nearest post office.

Step 2: track down someone — usually just another passport holder — to be your photo referee (ie, to agree that it is you in the picture). Gather relevant documentation, that is, proof of identity and of citizenship. If you were born in Australia on or after 20 August 1986, see below.

Step 3: ring up local post office for passport interview, usually granted within the week. If you need it sooner, call several post offices in turn or go to the Passport Office (in a capital city).

Step 4: attend post office. Have them take your photo, these days, because if they don’t approve it, they can take it again. Have interview, which in fact largely consists of having your documentation and photo checked for validity.

Step 5: pay fee ($233), extra $103 for priority.

Priority passports are printed to be mailed within 2 business days, other applications within 10. They arrive registered post (ie, signature required). If you require one within 2 days, it seems you need to attend a Passport Office in person and hope they can help.

Given that I understand it takes weeks and weeks to get a USA passport if not expedited, 10 days is not too bad.

Born in Australia on or after 20 August 1986? Tricky! This is when Australia stopped granting citizenship by right of birth alone. So you need proof of citizenship, which can include:

  • evidence that you were born in Australia and that one of your parents was either a citizen or permanent resident at the time of your birth
  • evidence that you were born in Australia and that you were still a resident of Australia on your 10th birthday (school records and so on)
  • evidence that you were born in Australia and were not eligible for any other citizenship
  • see also

This diversion has been known to be lengthy. 🙁 It’s also just about impossible to get one as a minor if your guardians don’t agree to you travelling.

Have a small child with you?

Good luck with that, because the photo standards require straight on face shot with open eyes and neutral facial expression. Try getting your pre- or semi-verbal child to do that.

Should you give birth privately?

A few people have been researching their options over the last few years about giving birth in Australia, and have asked me what I think about having private health insurance or giving birth in a private hospital.

Background: maybe you shouldn’t ask me! I’m not a health professional, I’m a mother of one, and he was born in a public hospital, in which I was a public patient.

And now, crucial fact about private hospital cover: it pays much of your hospital stay fees and some of your doctor’s in-hospital fees. It does not pay for private consultations with a doctor in an outpatient/private room setting.

You know what obstetricians charge a lot for? The “pregnancy management” fee, to cover your outpatient care in pregnancy. If I recall correctly, the Medicare rebate for this is on the order of $400 to $500. In Sydney, private obstetricians may charge upwards of $4000 for this fee. Who covers the difference? You do. (OK, full disclosure, the Medicare Safety Net may help too, I don’t know the details except that MSN actually cut benefits specifically for obstetricians a few years ago because they’d all upped their fees to incorporate the MSN rebate. So, mostly you do!) Also, anaesthetists in the private hospitals usually end up with a decent gap fee, if you have an epidural or Caesearean.

So, private system birthing is expensive regardless of insurance.

Finally, tests like ultrasounds are usually Medicare plus out-of-pocket too.

Now, birth choices in Australia.

Homebirth. There are some very small number of hospitals in Australia that will allow their midwife staff to attend some homebirths. It’s very easy to get disqualified from such a program. I would be on several grounds (some more legit than the one I’m about to give you), including the simple fact that my son’s birthweight was over 4.0kg.

You might also birth with a privately practicing midwife, or, in theory, with a private midwife collaborating with an obstetrician as backup (there are very few such arrangements so far). Most, although not all, private midwives will also only work with pretty low-risk women (singleton pregnancies, head-down, no high blood pressure or diabetes, that sort of thing, about 80% of pregnancies get a low-risk classification IIRC).

Is private insurance useful? Some private health funds provide some limited cover for this, I believe, on the order of $1k to $2k of the midwife’s fee, which is around $5k last time I looked. In the collaboration setup Medicare contributes too, I think?

Birth centre These are midwife-only maternity units attached to public hospitals. (Sometimes at some physical distance, eg Ryde Hospital only has a birth centre, with transfers to Royal North Shore several suburbs away.) You need to be assessed as low risk and if that assessment changes (and this isn’t uncommon, eg, your baby is breech or you get diabetes or pre-eclampsia) you get summarily transferred to the doctors and your whole care team often is suddenly switched out from under you. (Also they usually don’t do epidurals, I think? So the transfer rate for pain relief is not insubstantial I believe.)

Is private insurance useful? No, this is publicly funded.

Public hospital, midwife’s clinic If you go to a public hospital, and are assessed as low risk, almost all of your pregnancy management will be by midwives. Often they “caseload” now, meaning you see the same one each time. Again, if you become high risk, swish, off to the doctors.

Is private insurance useful? No, this is publicly funded.

Public hospital, doctor’s clinic. If you aren’t low risk, this is you. (This was me.) Chronic health problems or pregnancy complications (like pre-eclampsia) put you here. For your appointments, or at least most of them, you see an OB registrar or staff specialist. On high rotation, often, that is, you won’t usually see the same one many times. If you have a vaginal birth it may still be midwife-only, or largely midwife managed.

Is private insurance useful? No, this is publicly funded.

Public hospital, private doctor’s patient. In this case, you choose your doctor, see them mostly in their own clinic, birth in a public hospital (with you or your private insurer paying for the facilities) with the doctor of your choice attending. This is subject to gap fees for the doctor.

Is private insurance useful? Yes, pays for your accommodation and some of the OB’s and anaethestist’s (if needed) gap.

Public hospital, private midwife’s patient. This depends on a midwife/obstetrician collaborative practice. As I said, rare, but there’s at least one that allows a public hospital birth (private admission) with the midwife of your choice: Melissa Maiman in Sydney.

Is private insurance useful? Yes, pays for your accommodation. Not sure what happens if an OB and/or anaethestist are needed.

Private hospital, private doctor’s patient. There’s no midwife-managed option. If you’re birthing in a private hospital, you need a doctor of your choice attending. Again, pre-birth consultations in their own clinic, and subject to gap fees.

It’s definitely worth noting that while your private doctor will be an obstretrician and can manage higher risk pregnancies, for really serious stuff like prematurity earlier than a certain point, pregnancies with more than 2 babies on board (I think) and similar, they will actually refer you into the public system!

Is private insurance useful? Yes, pays for your accommodation and some of the OB’s and anaethestist’s (if needed) gap.

Public hospital, high risk clinic. I don’t know much about this, I’m told it’s the next level up in risk, and it well might be my next pregnancy. Joy. This is where you end up with OBs with a high risk interest, maternal-fetal medicine specialists (OBs with a formal subspecialty in very high risk pregnancies), renal physicians, endocrinologists, etc. This often involves referral to a tertiary hospital. (Sometimes specialists can consult without you being in one of these, like, an endocrinologist might monitor diabetes or thyroid hormones with you in the regular doctor’s clinic or seeing a private OB.) Birth choices guides don’t talk about this option very much, because you don’t really have a choice at this point (except birthing unattended or with a very risk-tolerant private midwife).

Is private insurance useful? I’m not sure, to be honest. It probably depends on the risk profile of your actual birth, I guess? If your birth is able to be attended by a regular private OB, maybe they let you do this? But you can do this publicly too.

Further reading on birthing choices
My Birth has a lot of information on birth procedures and the outcomes of different birthing providers, from a low intervention advocacy standpoint. One thing of note which gets picked up a lot by low intervention advocates is that despite the private birthing system referring all their hardest cases back to public, and despite the public patient profile being poorer with less good preventative health care and so on, private hospitals have much higher intervention rates.

Conclusion

It really depends on where you want to birth and with who attending. If the idea of the same doctor doing your pregnancy management and attending your birth appeals, that’s tending towards private birthing and thus private health insurance. But it has high out of pocket costs on top of the insurance premiums. (Note also that private health insurance policies are expensive if you include obstetric coverage, and will always have a 12 month waiting period for it, so you must obtain it before pregnancy.)

I was reasonably happy as a doctor’s clinic patient for my first birth. If I was low-risk I’d probably likewise go public, ideally with a birth centre or caseload midwife pregnancy+birth.

When your misdeeds are archived

This article originally appeared on Geek Feminism.

This is an Ask a Geek Feminist question for our readers. It’s the last for this round.

This one is actually from me, it’s related to some questions I’ve been asked by various people who will remain anonymous (and who didn’t formally write to Ask a Geek Feminist). I have my own thoughts on this, and I also think it can vary (helpful!)

What do you think people and groups should do about sexism in their “archives”? By this, I mean for example, older stuff on their blog, or Facebook postings from years ago, or similar? A lot of people have sexism in their past, varying from “I used to be a pretty committed sexist actually” to “um, I didn’t really think about it, and I wanted to fit in, and I went through a ‘Your Mom’ phase for a while there”. Things you do on the Internet are pretty long-lived now, and your sexism sticks to your name while it remains visible.

Assuming someone or someones have control of their content, and they have sexism they don’t like in there, and they have reason to think it’s going to hurt someone. Should they remove the content? Should they edit it with warnings and apologies?

Have you seen this in a real situation? What did they do? How did it work for them and for women near them/involved in their community?

At least for systemic stuff, I tend to be on the ‘edit’ side of the fence. There are a few reasons for this:

  1. even if you’ve totally changed and are ashamed and sorry, being a reformed sexist is something that may make people, women in particular, cautious about you. Living with that is part of the deal. You don’t get to get access to Has Always Been The Best Person Ever cred because you weren’t.
  2. it also serves as a guide to How To Do It, for other reforming sexists (or How Not To Do It, if you apologise but don’t actually change)

And while writing an apology that is short and not self-serving is a challenge, but that doesn’t mean one shouldn’t try.

On the other hand, I, in general, do wish that much informal discussion on the Internet yellowed and started to curl at the edges and be difficult to read as time passed, sometimes. I realise that the invention of writing was some considerable time ago now, but even so, having to stand by your casual thoughts for years is a big ask. I can’t see that one should make a special effort to preserve evidence of one’s sexism if that same set of archives is going to disappear in its entirety.

PhD status

Mount Everest as seen from the Tibetan plateau
Mount Everest by Joe Hastings

A quick note that appearances do suggest that I am in the final weeks of my PhD, with submission in late May. I am reluctant to say this because I’ve been wrong before, but this time my supervisor agrees. So.

I probably will be pretty absent for several weeks. And if I am not, I may be very tired.

Also an explanation of how this works in Australia, because it’s quite different to North America. Mostly writing this so that people don’t start addressing me as ‘Doctor’ in June.

Short version: this work is me preparing my thesis for initial examination, and this is hopefully the hardest bit. But I won’t graduate for at least six months.

First, I finalise my thesis document (we don’t call it a dissertation). I submit this to the university where it is examined by three external examiners: ideally at least one from an Australian university. At this point my work on it is in deep freeze.

Unlike in North America in general, these examiners are anonymous to me (chosen by my supervisor) and were not involved in my PhD studies prior to this point. This means in theory that they might not like it: in practice I am told that around 99% of students who submit at all eventually graduate.

Examination in theory takes six weeks, it could take as long as six months (since appointing a whole new examiner might be slower than waiting for a late one). They submit reports which my supervisor reads and makes recommendations on (most commonly I agree, Mary should indeed fix all these things, followed by I almost entirely agree, Mary should indeed fix all but a few of these things). This is fed into the higher degree research committee (who usually agree with the supervisor, but they might come up with a different answer if the examiners’ recommendations varied a lot) and then there’s a huge range of possible decisions that come out of the HDR committee:

  1. pass as is
  2. make minor amendations to the Library copy and pass
  3. minor revisions to be checked by supervisor (for which I’d be allocated a month) and then pass
  4. major revisions to be checked by supervisor (for which I’d be allocated two months) and then pass
  5. revise and resubmit to examiners a second time
  6. only award a Masters degree (possibly in combination with revisions): recall that in the Australian system I don’t already have a Masters degree
  7. fail

The most likely decision by far in my research group is minor or major revisions: I’ve never heard of anyone avoiding them. Some people in fact prefer major just because you get a bit more time to revise. (In other faculties, it isn’t unheard of to pass without revision.) No one wants to be re-examined: this usually means re-enrolling and re-doing experimental work and similar.

Unless re-examination is needed, after any required revisions it is pure administrivia: the HDR committee must pass it, and then the university Senate. I submit a bound copy of my thesis to the university library and (far more importantly now) put it on my website and submit to the university’s digital collection.

I think at that point I am finally a graduand and can use the title ‘Dr’ in academia and so on. Actual graduation would take place in either September/October or April/May, so in the pathological case it could be a while between finalising the thesis and actually graduating.

I do not do an oral defence (a three hour or so session where my examiners ask me questions in person).

Writing violence against a woman

This article originally appeared on Geek Feminism.

This is an Ask a Geek Feminist question for our readers:

I am male who wants to write a novel about a female superhero. Since this is a superhero novel there will be violence and at some point my hero will have to lose a fight (though of course she wins in the end).

I am wondering how I should write the scene where the supervillain beats the crap out out of my female hero. Should I just write as if she were a male? Or do I need to take precautions so I don’t end up glorifying violence against women?

A quick thought on this one: there’s no “just” in “write as if she were a male”. A big part of the problem is that this is pretty rare, hence the Women in Refrigerators trope and similar critiques. Your own knowledge that she’s a woman will influence you to write violence specific to her gender and to cultural tropes about male-on-female violence.

So, I think you’ve set up a bit of a false dilemma between “write what comes naturally and it will be just like as if she was a man getting beat up” or “go out of my way to de-glorify the violence against her”. Another thing you need to be careful of is “write what comes naturally and spew your cultural uglies about women and their bodies and violence against them all over the page completely unawares.”

Second thought: you don’t want to “write as if she were a male”, in any case, because she isn’t. You want to write as if she was a person. Your current thinking on this seems to be edging towards “men are the pattern for people, women are special unique cases of people” which is a little concerning for your characterisation of a woman!

Do you have a writing group who review each other’s drafts? Does this group contain women? Obviously the women in your writing group should be reviewing all the work that your male peers do, not just “hey, I have a woman-centric bit here, so now you’re the expert, but I’ll ask John about the rest of my writing.” But you could ask the group in general for feedback on this and since you can show them the actual draft, they may have more specific thoughts.

You could perhaps get some of the way with playing around with reading and writing drafts of your violence scenes gender-switched and with more ambiguous pronouns in order to try and keep the uglies out of it, but I think this is where we need some fiction writers to step in. What think you?