vrijdag 9 december 2011

Sony Kapoor

Onlangs een interview gelezen met de man. Quite a story. Komt van Lehmann Brothers om dan een anti-financiële denktank op te richten (Re-Define).

Blog is zeer degelijk uitgewerkt:
http://www.re-define.org/blogs/sonykapoor

vrijdag 25 november 2011

Indexatie

De loonindexatie wordt weer op de korrel genomen, maar ... door een leger randdebielen.
Nu weet ik er, in de lijn van al de rest dat ik hier stel, ook het fijne niet van. Op dit moment probeer ik te begrijpen wat Peersman voorstelt. Eerst betoogt hij namelijk dat een indexering slechter is dan géén indexering bij een gedeelde centrale bank, en daarna wil hij de inflatietarget van de centrale bank overnemen. Ik denk dat dit twee volledig verschillende opties zijn en geloof die tweede liever dan de eerste.

Aan het werk dus, en als uitvalsbasis gebruiken we de evolutie van de indexen die onze staat publiceert op:
http://statbel.fgov.be/nl/statistieken/cijfers/economie/consumptieprijzen/

Fantastisch, nietwaar ?

Meer volgt ...

donderdag 24 november 2011

Data collected by the United Nations

Data on lots of things
http://data.un.org/

Economic data on Europe
It's like Eurostat except that it's not.

http://w3.unece.org/pxweb/Dialog/

World Bank data

Beste dataset voor comparatief onderzoek. Alle landen, prima interface en een goed uitputformaat.

http://databank.worldbank.org/ddp/home.do

Soms raak je sneller in de juiste databank vanuit de browsemenus:
http://data.worldbank.org/indicator/SL.GDP.PCAP.EM.KD/countries?page=1&display=default

De wereldbank heeft ook interessante landenfiches, bijvoorbeeld:
http://data.worldbank.org/country/germany
http://data.worldbank.org/country/china
http://data.worldbank.org/country/belgium

Statbel

Ze zijn erop vooruit gegaan. Zelfde data als VN & Eurostat.

http://statbel.fgov.be/

Eurostat

Al zoek je best gewoon naar Eurostat via Google, dit is de rechtstreekse link naar de data:

http://epp.eurostat.ec.europa.eu/portal/page/portal/statistics/search_database


vrijdag 21 oktober 2011

Voorspellen uitkomst verkiezingen

Hoe gaan we om met partiële resultaten voor het voorspellen van de uitslag?

Eenvoudig: we voorspellen de score in jaar t door de score in jaar t-1 met de effecten B gekend in t en de kenmerken X in jaar t.
score = score[t-1]B + XG

Iets omslachtiger: de evolutie kan voorspeld worden en dan geënt op de scores uit jaar t-1. Het verschil hier is dat de kenmerken een relatieve groei aangeven eerder dan een absolute.
score = score(t-1).XB
exp(score) = exp(score(t-1)) + exp(XB)

Social surveys

Value surveys

These are easily available.

Work surveys

The microdata in general hast to be requested:

Presenteren

Enkele didactische principes bij het maken van een presentatie
  • Zoek ofwel een professionele template ofwel een lege achtergrond
  • Zorg voor een consistente opmaak, links, en referenties
  • Gebruik een groot lettertype
  • Baseer je verhaal op grafieken en illustraties
  • Beperk je tot de essentie, hou het kort
  • Schrijf geen volzinnen (tenzij in citaten), maar spreek tijdens je presentatie
  • Gebruik een vlakke structuur, geen complexe hiërarchie
  • Doe de inleiding en de vragenronde zonder slides
  • Spiegel je aan de TED Talks

Links

http://vdab.be/magezine/juli11/powerpoint.shtml
http://www.garrreynolds.com/index.html

woensdag 19 oktober 2011

Stata links

This is a list of useful web information on Stata.

Stata Dailyhttp://statadaily.wordpress.com

Stata commands

This is a list of commands-to-consider. Just enter help and the command, and you might be saved. For user written programs, type ssc install [command], replace.


regexm - regular expressions in Stata
estout - making regression tables in Stata

Stata factor variables

As my search always ends on this page, I might as well cite it. It's like help fvvarlist but more extensive - a nice list of Stata's available prefixes:

http://www.ats.ucla.edu/stat/stata/seminars/stata11/fv_seminar.htm



donderdag 13 oktober 2011

Een construct maken

Dit is een oud en niet zo interessant stuk.

Hou enkele punten indachtig bij het werken met constructen:
  1. Constructen synthetiseren vaak de data: je verliest dan informatie. 
  2. Redenen om een construct te maken:
    1. De onderliggende dimensies zijn met elkaar verbonden via een latente factor. Bijvoorbeeld: de resultaten op elk individueel examen geven aan hoe het gesteld is met de cognitieve ontwikkeling van een scholier.
    2. De onderliggende dimensies zijn niet met elkaar verbonden, maar veroorzaken eenzelfde effect. Bijvoorbeeld: psychische stress veroorzaakt stijfheid van de spieren, bijvoorbeeld in de lage rug. Ook mentaal onbelastend (dus: geen correlatie) maar fysiek zwaar werk zoals het plaveien van straten, kan dit veroorzaken. Als je een schaal voor risico op lage rugpijn wil maken, dan kunnen beide factoren opgenomen worden. Maar ook: de einduitslag in de tienkamp wordt veroorzaakt door de uitslag in de verschillende disciplines en in die zin is de einduitslag een construct (dat louter berust op het reglement). 
  3. Welke methode? Zorg voor een goede argumentatie.
    1. Factoranalyse: factoren zijn interessante latente variabelen, maar de schaal is soms moeilijk te vatten.
    2. Een simpele som van items: test Cronbach's alpha voor consistentie.
    3. Een gewogen som op basis van literatuur: indien jouw data niet toelaat zelf de factor te onderzoeken.

Websites voor statistiek

Tot mijn grote verbazing moet statistiek op het net niet onderdoen voor verzorgingsproducten. De zoekterm 'anova' wint een Google fight met sprekend gemak van 'moisturizer' en 'fond de teint', moet slechts een duimbreed toegeven aan de zalvengigant 'Nivea' (tenzij mensen op zoek naar zalf per abuis 'anova' intypen).

In elk geval, dat zou ons hoopvol moeten stemmen als het erop aankomt hulp te krijgen wanneer je in nood bent. Om een lang verhaal kort te maken: dat soort sites blijft zeldzaam. Ik geef hier enkele fora die ik gebruik:

http://stats.stackexchange.com/ - een prima site voor inhoudelijke vragen
http://stackoverflow.com/questions/tagged/stata - vragen van programmateurs, voor elke taal (vervang 'stata' in de link door 'sas' of 'r' of 'spss', en je komt in de juiste rubriek
http://www.stata.com/statalist/ - zeer ouderwetse mailinglijst voor Stata, maar ongelofelijk populair en goed geïndexeerd

dinsdag 11 oktober 2011

Alternatives to ... Powerpoint

I wasted some time looking around for Powerpoint alternatives. Basically, my conclusion is: don't do that. It's not because Powerpoint is such a great program, but rather because the alternatives have limitations which are more serious than the rightly criticized linearity of Powerpoint.

Anyway, what to expect:

  • [Sozi] It's open source and entirely vector based. It would make for a good banner or a graphic scheme you want to discuss focussing on the composing parts. *
  • [Vue] The best alternative in my view, which lets you construct different paths over the slides and insert midway overview in the presentation where you can get off road. A good idea, but not very user friendly. ***
  • [Prezi] This is very good looking software, but it has some major drawbacks. First of all, it's all flash and therefore heavyweight. Any animations you include need to be flash movies, which are very hard to make. The choice of slide templates is limited and customization options do not really help you out. There is a svg-alternative in the making, but that means it is currently useless. **
  • [ahead] As Prezi, but better looking. Spend some time and impress your audience. Not for quick tasks and only online. ****
  • [Zoho] As Powerpoint, but online and owned by Google. **

woensdag 31 augustus 2011

Alternatives to ... kladblok

Precies omdat andere programma's zo complex en lomp worden, is kladblok vaak zeer handig en zelfs de redder in nood. Maar er zijn toch een aantal andere programma's die mooie extra's toevoegen en toch eenvoudig blijven:
  • [Notepad++] Gebruik ik op dit moment. Bevat alle nodige functies en woordenboeken voor elke programmeertaal.
  • [Crimson Editor] Gebruik ik niet meer omdat het niet meer vernieuwd wordt.
  • [Textpad] Is een sterk programma, maar toont af en toe pop ups tot je betaalt.
  • [ConTEXT] Geïnstalleerd maar ik gebruikte het niet.
  • [Bluefish] Heb ik geïnstalleerd maar het werkt niet. Zou goed moeten zijn om online bestanden in webformaten aan te passen.
Ze laten toe reguliere expressies te gebruiken voor zoek- en vervangopdrachten, bieden syntax highlighting voor veel programmeertalen, openen bestanden in tabs, werken deze bij als ze in een ander programma werden gewijzigd en hebben een blokselecteerfunctie.

Voorbeeld van het gebruik van reguliere expressies:
http://www.ozzu.com/mswindows-forum/repalce-character-with-carriage-return-line-feed-t56436.html

Als je denkt als een typemachine is de newline instructie \n\l eenvoudig:

  • \n vraagt een nieuwe lijn
  • \r zet de cursor terug bij het begin van de lijn (return)

Stata and graphics

Although the graphs aren't really flashy, Stata is quite good in generating graphical output and automatizing the proces. There is a vaste array of possible graphs to choose from. Below are some links.
For variations on the histogram command, try:
  • byhist
  • catplot
  • tabplot
  • spineplot
  • simple bar graphs, provided you bin and collapse variables first yourself

Stata, ranks and quantiles

I'm a huge fan of Stata, largely preferring the program over SPSS for almost everything, even graphics and tables. Yet ranks and quantiles are quite awkward. The commands needed are:

rank() - using egen, watch out for the order
xtile - basic program included in the software (Stata 11)
xtile2 - permits by-variables, to be installed

Office 2007, pdf's en algebra

Wanneer "vreemde en complexe" lettertypes niet geïnstalleerd zijn, zal de functie 'opslaan als pdf' in de Office-programma's niet werken. Oplossing: print met een pdf-printer (pdf995) of installeer de lettertypes.

httpBericht publiceren://help.lockergnome.com/office/Problems-equations-Word-2007--ftopict943892.html

Factoranalyse

Een zeer korte handleiding voor factoranalyse:

Waarom factoranalyse

Factoranalyse is een datareductiemethode, waarbij gezocht wordt naar latente variabelen die een set van variabelen samenvatten. Het vertrekt daarom van de correlatiematrix van deze geobserveerde variabelen.

Voorbeeld: leerlingen leggen op het eind van het jaar twaalf testen af. Een exploratieve factoranalyse zou aan het licht kunnen brengen dat dit eigenlijk slechts drie vaardigheden toetst.

  1. Taalvakken: Nederlands, Frans, Engels, Duits
  2. Analytische vakken: wiskunde, natuurkunde, scheikunde, logica
  3. Kennisvakken: geografie, biologie, geschiedenis, esthetica
Een confirmatorische factoranalyse werk op de omgekeerde manier: 

Let op!


  • Controleer eerst de correlatiematrix: enkel variabelen die een correlatie boven .30 met andere variabelen hebben dienen te worden weerhouden.
  • Gebruik geen factoranalyse als de correlatie tussen variabelen niet aan een latente factor te wijten is maar bijvoorbeeld aan de distributie van de populatie op irrelevante kenmerken.

Scree plot



Assumpties
Dezelfde als voor correlaties: normaal verdeelde, continue variabelen. Heb je ook of enkel ordinale of binaire data, dan moet je vluchten naar polychorische principale componentenanalyse (het trage en onoverzichtelijke polychoricpca in Stata of de complexe explorative factoranalyse in Mplus).

Eigenwaardes
Als een vuistregel gebruikt men Kaisers criterium (Kaiser's criterion) dat zegt dat eigenwaardes groter dan 1 moeten zijn. Alternatief kan je kijken naar relatieve sterke dalingen van de eigenwaarde, naar de cumulatieve voorspelde variantie, naar de factorsterkte (Mplus: > .9) of naar bepaalde significantiematen (Mplus: RMSE). 

Rotatie
Om de geobserveerde variabelen te scoren op een bepaalde matrix zijn er verschillende mogelijkheden. Orthogonale rotaties of oblique rotaties. Voor zover ik het begrijp zijn de dimensies in een orthogonale rotatie niet gecorreleerd (denk aan een kruis met rechte hoeken), terwijl dit in oblique rotaties wel het geval is (een kruis met scherpe en stompe hoeken). De vergelijking met kruisen gaat natuurlijk enkel op in twee- of driedimensionele omgevingen. De richting van de rotatie wordt bepaald door de te maximaliseren of minimaliseren afstand:
  • Varimax: maximaliseert per factor de variantie van de ladingen op deze factor
  • Quartimax (~oblimax): maximaliseert per variabele de variantie van de ladingen op de verschillende factoren
  • Geomin (Mplus), oblimin, equamax, ...
Er zijn slechts vuistregels omtrent de interpretatie van de factorladingen. Vanaf .400 en zeker vanaf .600 spreken we van hoge ladingen, al hangt het telkens af van de rotatiemethode.
Links
Yahoo Answers: What are difference between varimax, quartimax and equamax rotation in factor analysis? - http://answers.yahoo.com/question/index?qid=20080616044600AAnsCc4

maandag 22 augustus 2011

woensdag 25 mei 2011

Cluster analysis: yeah yeah yeah

Context
For a recent working paper, I did some cluster analyses. Plural, my friend, because there's not one way. Before reading further, please understand that cluster analysis is an explorative, non-inferential method.

Problem
The Stata manual says it all: "Some researchers claim that there are as many clustering methods as there are researchers. This is untrue, there are many more methods than researchers." The wording may not be exact, but I agree with the statement. In this post, I will address some difficulties.

Issues

  • Linkage method: there are five linkage methods, which define how cases get grouped: which distances to look after. There is no optimal method: single linkage causes linking patterns (one cases after another joining the same cluster), average linkage and ward's linkage are sensitive to outliers, ward's linkage distance measurement is not possible to interprete and centroid linkage will even refuse to return dendrograms.
  • Similarity distance measurement: there are many distance measurements: simple, Euclidian, city block, Mahalanobis, ... Which one to choose? There's no truth.
  • Cases: excluding cases may skew central values of clusters, resulting in wrongly added cases
  • Order: in two-step cluster analysis, some pre-clustering is done before tackling the full data set (because it may be too large). Shuffle your deck and you'll get different results.
  • Variables: ideally you cluster orthogonal factors, still, and in the general case, it doesn't mean that each variable/factor is equally important for clustering. They will all have the same a priori impact on clustering though.
  • Succes garanteed: you'll always get a result. Does that mean you found something? No. 
  • Stopping rules: there are many rules to determine the optimal number of clusters (see Mulligan, 1985). Calinski is default in Stata. There are some issues though, such as multiple optima or none at all. And does it make sense to choose a 23 cluster solution?
Conclusion

Cluster analysis is a wonderful way to reduce and explore data. However, I would recommend to experiment with different ways and keep my hands of it if they bear no similarity. Heck, a cluster analysis of outcomes would be useful!

Judgement: not to be trusted

maandag 2 mei 2011

Do people actually read them too?

Nick Cox is the incarnation of Stata. His view on table-machines, when asked to make more user friendly Stata tables:


http://www.stata.com/statalist/archive/2010-11/msg00071.html


I think that is a good summary of a widely held view. I have no axe to grind here as I am not a provider in the main territory that Thomas has in mind, but on behalf of fellow user-programmers I suggest that the descriptor "ad hoc" does not quite fit the situation.


Of the programs implied here, and that I know about, I'd say that they all have a clear vision of what they want to do which has been maintained throughout their development. It can seem ad hoc if you want to do something else, but that is a different matter. As I've already remarked in this thread, user-programmers tend to write programs for themselves, with no guarantee of meeting anyone else's needs.


The overall problem here is describable in two words "better tables" and lots of users want to second that. But some want more unified syntax for tables within Stata, some want more detailed control, some want greater support for export to their own favourite foreign programs, standard or otherwise, and some want two or three of those. All understandable enough, but don't complain if this all turns into a [T] manual several hundred pages long to meet not only your reasonable requests, but most other people's too!


Emphasis here varies depending on where you come from. Some people seem routinely to be producing tens or hundreds of tables in rigid formats full of coefficients, standard errors and P-values and those awful stars. Do people actually read them too?


Nick
n.j.cox@durham.ac.uk


P.S. On a key question of intellectual priority, I lay claim to "Some Alternative Software", as indeed could anyone else who came up with it earlier or later. But (with thanks to Maarten for the compliment) the joke about there being so many standards to choose from is certainly not mine. Andrew Tanenbaum got there much earlier.

vrijdag 25 maart 2011

Academic writing: citations

What do I do with DOI? Include it in te APA reference! http://library.nmu.edu/guides/userguides/style_apa.htm#withDOI

Determinanten: jobtevredenheid

Jobtevredenheid wordt bepaald door:

  • Loon
    • Schokkaert, E., Van Ootegem, L., & Verhofstadt, E. (2010). Measuring job quality and job satisfaction.
    • Furnham, A. 1997. The psychology of behaviour at work. The individual in the organization. Hove East Sussex: Psychology Press.
    • Gazioglu, S., & Tansel, A. (2006). Job satisfaction in Britain: individual and job related factors. Applied Economics, 38(10), 1163-1171. doi:10.1080/00036840500392987

Indicator: opleidingsniveau

In niveaus
ISCED

In jaren
Aantal geslaagde studiejaren na 12 jaar
  • Schokkaert, E., Van Ootegem, L., & Verhofstadt, E. (2010). Measuring job quality and job satisfaction.
  • Probleem: wie een jaar vooruit zit wordt hierdoor zwakker ingeschat, en wie een of meerdere jaren achterstand opliep in het lager kan hierdoor foutief een hoger niveau toegewezen krijgen

Academic writing: idioms and hyphenations

Because sometimes one wonders what can pass and what not:


Britisch vs. American English

I expand on this elsewhere.

Idioms

In the remainder = vanaf nu
Strikings findings = opvallende vaststellingen
The most novel contribution = de laatste bijdrage
To hold (true) = opgaan voor, waar zijn, waar blijven

Hyphenate or not?

With hyphen

Blue-collar
White-coller
High-level
Low-schooled
Co-ordination (for some old fashioned folks, also at the conservative oed.com)

And most adverbs that specify an adjective.
Far-stretching results, for example.

Without hyphen

Anything that is clear without hyphen.

Coordination (if you rock)

Adverbs with -ly suffix. For example: collectively agreed wages.

Noun noun combinations: For example: a car garage.

vrijdag 18 maart 2011

Inkomensongelijkheid

Richest 20% to poorest 20% (p80/p20)
  • Adam, F., Kristan, P., & Tomsic, M. (2009). Varieties of capitalism in Eastern Europe (with special emphasis on Estonia and Slovenia). Communist and Post-Communist Studies, 42(1), 65–81.
Gini-coefficient
  • Adam, F., Kristan, P., & Tomsic, M. (2009). Varieties of capitalism in Eastern Europe (with special emphasis on Estonia and Slovenia). Communist and Post-Communist Studies, 42(1), 65–81.

donderdag 17 maart 2011

Mixed Models

Andere termen: multilevelanalyse, longitudinale analyse, growth models en varianten.

Voor een eenvoudig multilevelmodel is de handleiding hier welkom.

Om statistieken te verkrijgen over het model (BIC, AIC) is er het commando postestimation
http://www.stata.com/help.cgi?xtmixed+postestimation

Een interessante toepassing is het opvatten van een mixed model als een SEM, zie:
http://blog.stata.com/2011/09/28/multilevel-random-effects-in-xtmixed-and-sem-the-long-and-wide-of-it/
(andere Stata blog posts i.v.m. SEM vind je hier).

Statalist

http://www.stata.com/statalist/

I really don't know why people are so helpful, but it is appreciated. The Stata List helps you out of your Stata problems.

dinsdag 15 maart 2011

Stata and Excel in Europe

Say it like it is, Stata is a very good program but it is not user-friendly. Even less so when you haven't quite got the same decimal/thousands separators in your native style.

After searching way too long for a solution, I found that we have to live with it. Like this:

http://www.stata.com/statalist/archive/2003-05/msg00353.html

woensdag 2 maart 2011

Blog: APA styles

http://blog.apastyle.org

De heersers over de citatiewereld

Blog: Academic Productivity

http://www.academicproductivity.com/

A blog about working as an academic. Well written.

zondag 9 januari 2011

De Phillipscurve

In twitter stijl gedefinieerd:

Bij een expansief budgettair beleid daalt de werkloosheid en stijgt de inflatie.

jip