Code based on: http://pages.stat.wisc.edu/~fyang/stat572/disc9.R
# checking that e_i all have the same variance:
gsame_var <- function(flmer){
#!/usr/bin/python | |
# -*- coding: utf8 -*- | |
# We'll use the pyzotero project for server access | |
# See packages.python.org/Pyzotero/ | |
from pyzotero import zotero | |
import sys | |
# Python's built-in CSV support is pretty nice |
'''Example of a custom ReST directive in Python docutils''' | |
import docutils.core | |
from docutils.nodes import TextElement, Inline | |
from docutils.parsers.rst import Directive, directives | |
from docutils.writers.html4css1 import Writer, HTMLTranslator | |
class foo(Inline, TextElement): | |
'''This node class is a no-op -- just a fun way to define some parameters. | |
There are lots of base classes to choose from in `docutils.nodes`. |
library(lme4) | |
data(sleepstudy) | |
## Fit individual regression lines for each subject | |
dfrm <- coef(lmList(Reaction ~ Days | Subject, sleepstudy)) | |
## Estimate parameters of a random intercept and random intercept and slope model | |
m1 <- lmer(Reaction ~ Days + (1 | Subject), data=sleepstudy) | |
m2 <- lmer(Reaction ~ Days + (Days | Subject), data=sleepstudy) |
Code based on: http://pages.stat.wisc.edu/~fyang/stat572/disc9.R
# checking that e_i all have the same variance:
gsame_var <- function(flmer){
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md)) | |
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md)) | |
all : $(SLIDES) $(HANDOUTS) | |
%.md.slides.pdf : %.md | |
pandoc $^ -t beamer --slide-level 2 -o $@ | |
%.md.handout.pdf : %.md | |
pandoc $^ -t beamer --slide-level 2 -V handout -o $@ |
I'm currently the lead instructor at Code Platoon and an instructor/developer at the Turing School of Software and Design.
I've been advocating the Fish shell and when the choice is up to me, I choose that for my students. Enough people ask about the decision, particularly in relation to the preinstalled Bash shell, that I figured it's worth laying out my reasoning.
"""Hotelling T2 example. | |
Following the notation in | |
https://en.wikipedia.org/wiki/Hotelling%27s_T-squared_distribution#Two-sample_statistic | |
""" | |
import numpy as np | |
from scipy import stats | |
import matplotlib.pyplot as plt |