- bowl 1
#################################### | |
# Section 2.3 Using a Discrete Prior | |
#################################### | |
install.packages('LearnBayes') | |
library(LearnBayes) | |
p = seq(0.05, 0.95, by = 0.1) # vector of proportion values | |
prior = c(1, 5.2, 8, 7.2, 4.6, 2.1, 0.7, 0.1, 0, 0) | |
prior = prior/sum(prior) # vector of prior probabilities |
# Section 1.2 R commands | |
# Section 1.2.2 | |
if (!require('LearnBayes')) install.packages('LearnBayes') | |
data(studentdata) | |
studentdata[1:3,] | |
attach(studentdata) | |
# Section 1.2.3 |
{ | |
"auto_complete": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"dictionary": "Packages/Languages/en_US.dic", | |
"font_size": 13.0, | |
"ignored_packages": | |
[ | |
"Vintage", | |
"WordCount", | |
"View In Browser" |
## installation following http://goo.gl/5TXSdn | |
#install django if it's not already installed | |
pip install Django==1.6.1 | |
python # make sure which version or versions you currently have installed | |
import django # just to test | |
# fork https://github.com/edx/insights | |
git clone https://github.com/rpietro/insights.git |
cd ~/edx-datajam-root ./edx-datajam ssh #get into virtual machine
sudo su edxapp # switch to the edxapp account
<snippet> | |
<content><![CDATA[ | |
if (!require('${1:package}')) install.packages('${2:package}') | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>requireinstall</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
<snippet> | |
<content><![CDATA[ | |
<problem> | |
<startouttext/> | |
<p> | |
${1:stem}</p> | |
<endouttext/> | |
<choiceresponse> | |
<checkboxgroup> |
<snippet> | |
<content><![CDATA[ | |
<problem> | |
<p> | |
${1:stem}</p> | |
<multiplechoiceresponse> | |
<choicegroup type="MultipleChoice"> | |
<choice correct="${2:true false}" name="${3:var1}"> | |
<text>${4:option1}</text> |
# script stolen and adapted from http://goo.gl/kUzaov | |
if (!require('lavaan')) install.packages('lavaan') | |
if (!require('Rcmdr')) install.packages('Rcmdr') | |
# creating a dataset for g + 3 factors, all orthogonal |