This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\tikzstyle{every picture}+=[remember picture] | |
\everymath{\displaystyle} | |
\begin{frame}[m]\frametitle{} | |
\tikzstyle{na} = [baseline=-.5ex] | |
\begin{itemize}[<+-| alert@+>] % makes everything red | |
\item Sujeto | |
\tikz[na] \node[coordinate] (n1) {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{frame}[m]\frametitle{} | |
\begin{tikzpicture} | |
\node[] (image) at (0,0) {\includegraphics[scale=.27]{btard_ae}\includegraphics[scale=.27]{btemp_ae}\includegraphics[scale=.27]{mono_ae}}; | |
\end{tikzpicture} | |
\end{frame} | |
\begin{frame}[m]\frametitle{} | |
\begin{tikzpicture} | |
\node[] (image) at (0,0) {\includegraphics[scale=.27]{btard_ae}\includegraphics[scale=.27]{btemp_ae}\includegraphics[scale=.27]{mono_ae}}; | |
\draw [-latex] (-5.35,.5) to[bend right=15] (-4.45,-0.15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A couple things about this script... | |
# All text that comes after a "#" sign implies a comment that will not | |
# be evaluated by R. All you need to do is copy and paste the contents | |
# of this script into R and it will perform an ANOVA and make a graph. | |
# It is important that your data (in your data file from the hw) are | |
# in the correct format. You need to have the following headers for | |
# each column: "participant", "ending", "stimulus", "proportion". | |
# Check the example file "tarea5.txt" if you need to compare. | |
# The following command reads the data file into R. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
plot <- ggplot(heat_plot, aes(fpro, dpro)) | |
plot + geom_tile(aes(fill=mean_choice), colour="white") + | |
scale_fill_gradient(low="white", high="steelblue") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
Generalized Linear Models | |
with binary categorical data | |
with binomial error structure | |
and logit link function | |
Categorical data is heteroskedastic. Residuals are not normally distributed. It violates assumptions of linear models. It can be approximated as a logistic curve (s-like-curve). This curve represents probability values: probability of observing 1 or 0 at y when steps in x change. (Ideal for perception data.) | |
model = glm(response ~ step in continuum or Hz, data=study, family="binomial") # regular generalized (logistic) linear model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot Spectrum Proportion | |
my_data$group <- factor(my_data$group, levels = c("EL", "NE", "LL")) | |
df<-with(my_data, aggregate(fpro, list(group=group, fstim=fstim), mean)) | |
df$se<-with(my_data, aggregate(fpro, list(group=group, fstim=fstim), function(x) sd(x)/sqrt(10)))[,3] | |
gp<-ggplot(df, aes(x=fstim, y=x, colour=group, ymin=x-se, ymax=x+se)) | |
gp +geom_line(aes(linetype=group), size = .4) + | |
geom_point(aes(shape=group)) + | |
geom_ribbon(alpha = 0.15, linetype=0) + | |
#geom_errorbar(aes(ymax=x+se, ymin=x-se)) + | |
ylim(0, 1) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################### | |
# Functions for linguistic research # | |
# Joseph V. Casillas # | |
# Last update: 12-10-2014 # | |
##################################### | |
# Calculate d prime in discrimination experiments. | |
# Takes a df with the columns: | |
# - stimDiff (actual stimuli are different) | |
# - stimSame (actual stimuli are the same) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
euc.dist <- function(x1, x2){ | |
x <- sqrt(sum((x1 - x2)^2)) | |
return(x) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot vowel formants | |
# - Include elipses, | |
# - group/vowel means | |
# - greyscale | |
# Load tidyverse and phonR package (I choose this because you said you | |
# had alrady used it) | |
library(phonR) | |
library(tidyverse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load libraries | |
library("tidyverse") | |
library("TOSTER") | |
# Set seed for reproducibility | |
set.seed(10) | |
# Working memory means for 3 groups | |
wm_n <- rnorm(mean = 8.67, sd = 1.15, n = 12) | |
wm_nin <- rnorm(mean = 9.04, sd = 2.11, n = 26) |
OlderNewer