Skip to content

Instantly share code, notes, and snippets.

View fernandomayer's full-sized avatar

Fernando Mayer fernandomayer

View GitHub Profile
@fernandomayer
fernandomayer / rnw2rmd.pl
Created February 16, 2018 20:46 — forked from lgatto/rnw2rmd.pl
Convert Rnw to Rmd
#!/usr/bin/perl
## Based on rnw2rmd.pl by Laurent Gatto
## https://gist.github.com/lgatto/d9d0e3afcc0a4417e5084e5ca46a4d9e
## The script ignores labels and references, un-numbered sections
## (section*), quotes and probably a couple of more. It won't deal
## with the pre-amble, bibliography and document tags either. Still
## useful, though.
@fernandomayer
fernandomayer / CMR.R
Created January 31, 2013 00:01 — forked from benilton/CMR.R
## Este exemplo provê um código em R que outros usuários podem reproduzir
## para facilitar a solução de problemas observados.
##
## Na R-br em: http://r-br.2285057.n4.nabble.com/R-br-Produzindo-um-Codigo-Minimo-Reproduzivel-CMR-td3674188.html
#################################################################
## PASSO 1: Carregue os pacotes necessários no início do código
#################################################################
library(splines)
n_sims = 1_000_000
mle_se = zeros(n_sims)
unbiased_se = zeros(n_sims)
yatracos_std_se = zeros(n_sims)
kourouklis_std_se = zeros(n_sims)
for sim in 1:n_sims
n = 10
x = randn(n)