Latest updates by Martijn Kingma (mkingma@fryske-akademy.nl) on 12/07/2024.
# Load the required libraries
library(tidyr)
library(ggplot2)
library(ggpubr)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(lmerTest)
## Loading required package: lme4
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
##
## Attaching package: 'lmerTest'
## The following object is masked from 'package:lme4':
##
## lmer
## The following object is masked from 'package:stats':
##
## step
# load in data
table3 <- read.csv ("data/Frisian_Breaking_barplots.csv", stringsAsFactors = TRUE)
comparatives <- subset(table3, form2 %in% c("comparative broken", "comparative non-broken"))
# Create a bar plot
comp_plot <- ggplot(comparatives, aes(x = score, fill = form2)) +
geom_bar(position = "dodge", alpha = 0.8) +
scale_fill_manual(values = c("#333333", "lightgray"), # Adjust colors as needed
labels = c("Comparative broken", "Comparative non-broken")) + # Labels for each pattern
labs(x = "Acceptability score",
y = "Frequency",
title = "") + # Title of the plot
guides(fill = guide_legend(title = NULL)) + # Remove the legend title
theme_minimal() +
theme(legend.key.size = unit(1, "lines"), # Adjust the legend key size here
legend.text = element_text(size = 14)) # Adjust the legend text size here
print(comp_plot)
superlatives <- subset(table3, form2 %in% c("superlative broken", "superlative non-broken"))
# Create a bar plot
super_plot <- ggplot(superlatives, aes(x = score, fill = form2)) +
geom_bar(position = "dodge", alpha = 0.8) +
scale_fill_manual(values = c("#333333", "lightgray"), # Adjust colors as needed
labels = c("Superlative broken", "Superlative non-broken")) + # Labels for each pattern
labs(x = "Acceptability score",
y = "Frequency",
title = "") + # Title of the plot
guides(fill = guide_legend(title = NULL)) + # Remove the legend title
theme_minimal() +
theme(legend.key.size = unit(1, "lines"), # Adjust the legend key size here
legend.text = element_text(size = 14)) # Adjust the legend text size here
print(super_plot)
table2 <- read.csv ("data/Frisian_Breaking_patterns.csv", stringsAsFactors = TRUE)
head(table2) # commented out for readability
## Word Pattern
## 1 Fier A-A-A
## 2 Fier A-A-A
## 3 Fier A-A-A
## 4 Fier A-A-A
## 5 Fier A-A-A
## 6 Fier A-A-A
# Filter the dataframe for 'Fier' results and select only FierPattern
filtered_data <- table2[table2$Word == 'Fier', ]
# Create a side-by-side bar plot
fier_plot <- ggplot(filtered_data, aes(x = Pattern, fill = Pattern)) +
geom_bar(alpha = 0.8) + # No dodge needed as there are only four distinct patterns
scale_fill_manual(values = c("lightgray", "#333333", "#333333", "lightgray"), # Adjust colors as needed
labels = c("A-A-A", "A-B-B", "A-B-A", "A-A-B")) + # Labels for each pattern
labs(x = "Fier Patterns",
y = "Frequency",
title = "") + # Title of the plot
guides(fill = FALSE) + # Hide the legend
theme_minimal() +
theme(legend.key.size = unit(1, "lines"), # Adjust the legend key size here
legend.text = element_text(size = 14)) # Adjust the legend text size here
## Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
## of ggplot2 3.3.4.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
# Show the plot
print(fier_plot)
# Filter the dataframe for 'Fier' results and select only FierPattern
filtered_data <- table2[table2$Word == 'Swier', ]
# Create a side-by-side bar plot
swier_plot <- ggplot(filtered_data, aes(x = Pattern, fill = Pattern)) +
geom_bar(alpha = 0.8) + # No dodge needed as there are only four distinct patterns
scale_fill_manual(values = c("lightgray", "#333333", "#333333", "lightgray"), # Adjust colors as needed
labels = c("A-A-A", "A-B-B", "A-B-A", "A-A-B")) + # Labels for each pattern
labs(x = "Swier Patterns",
y = "Frequency",
title = "") + # Title of the plot
guides(fill = FALSE) + # Hide the legend
theme_minimal() +
theme(legend.key.size = unit(1, "lines"), # Adjust the legend key size here
legend.text = element_text(size = 14)) # Adjust the legend text size here
# Show the plot
print(swier_plot)
table.graph <- read.csv("data/Frisian_Breaking_boxplots.csv", stringsAsFactors = TRUE)
# head(table.model) # looks good so commented it out
# Create facet boxplots
ggplot(table.graph, aes(x = Breaking, y = Acceptability.Score)) +
geom_boxplot() +
facet_grid(. ~ Form) +
labs(y = "Acceptability Score") + # Add y-axis label
theme_minimal()
# load in data
table.model <- read.csv ("data/Frisian_Breaking_Model.csv", stringsAsFactors = TRUE)
# head(table.model) # looks good so commented it out
# set contrasts
contrast <- cbind (c(-1/2, +1/2))
colnames (contrast) <- c("-comp+super") # -0.5 comparative, +0.5 superlative
contrasts (table.model$form) <- contrast
contrasts(table.model$form)
## -comp+super
## comp -0.5
## super 0.5
contrast <- cbind (c(-1/2, +1/2))
colnames (contrast) <- c("-break+nonbreak") # -0.5 broken forms, +0.5 non-broken forms
contrasts (table.model$breaking) <- contrast
contrasts(table.model$breaking)
## -break+nonbreak
## break -0.5
## nonbreak 0.5
contrast <- cbind (c(-1/2, +1/2))
# Filter the data for breaking 'break' and form 'comp'
subset_data <- table.model[table.model$breaking == 'break' & (table.model$form == 'comp'), ]
mean_value <- mean(subset_data$score)
sd_value <- sd(subset_data$score)
# Print the results
cat("Mean:", mean_value, "\n")
## Mean: 4.873016
cat("Standard Deviation:", sd_value, "\n")
## Standard Deviation: 0.5511316
# Filter the data for breaking 'break' and form 'super'
subset_data <- table.model[table.model$breaking == 'break' & (table.model$form == 'super'), ]
mean_value <- mean(subset_data$score)
sd_value <- sd(subset_data$score)
# Print the results
cat("Mean:", mean_value, "\n")
## Mean: 4.779661
cat("Standard Deviation:", sd_value, "\n")
## Standard Deviation: 0.6684028
# run the maximum model
model1 <- lmer(score ~ breaking * form + (1 + breaking + form | participant) + (1 + form | word), data=table.model)
## boundary (singular) fit: see help('isSingular')
summary(model1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: score ~ breaking * form + (1 + breaking + form | participant) +
## (1 + form | word)
## Data: table.model
##
## REML criterion at convergence: 1458.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.9974 -0.2995 0.1426 0.3460 3.0205
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.1938679 0.44030
## breaking-break+nonbreak 1.0101218 1.00505 0.99
## form-comp+super 0.0912606 0.30209 -0.42 -0.53
## word (Intercept) 0.0249149 0.15784
## form-comp+super 0.0003053 0.01747 1.00
## Residual 0.9178754 0.95806
## Number of obs: 488, groups: participant, 61; word, 2
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 4.01356 0.13238 1.48787 30.319
## breaking-break+nonbreak -1.62848 0.15521 62.47869 -10.492
## form-comp+super 0.47995 0.09605 24.43682 4.997
## breaking-break+nonbreak:form-comp+super 1.16248 0.17414 363.25535 6.676
## Pr(>|t|)
## (Intercept) 0.00468 **
## breaking-break+nonbreak 2.06e-15 ***
## form-comp+super 3.99e-05 ***
## breaking-break+nonbreak:form-comp+super 9.24e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) brkn-+ frm-c+
## brkng-brk+n 0.350
## frm-cmp+spr 0.046 -0.176
## brkng-b+:-+ 0.000 0.018 0.005
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
# We leave out the predictor with the least explained variance
model2 <- lmer(score ~ breaking * form + (1 + breaking + form | participant), data=table.model)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00265948 (tol = 0.002, component 1)
summary(model2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: score ~ breaking * form + (1 + breaking + form | participant)
## Data: table.model
##
## REML criterion at convergence: 1462.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.0468 -0.2589 0.1329 0.3364 3.1366
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.19309 0.4394
## breaking-break+nonbreak 1.00479 1.0024 0.99
## form-comp+super 0.07775 0.2788 -0.43 -0.53
## Residual 0.93520 0.9671
## Number of obs: 488, groups: participant, 61
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 4.01075 0.07133 64.42707 56.232
## breaking-break+nonbreak -1.62850 0.15539 62.60103 -10.480
## form-comp+super 0.48584 0.09481 66.58023 5.124
## breaking-break+nonbreak:form-comp+super 1.16126 0.17577 364.23357 6.607
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## breaking-break+nonbreak 2.10e-15 ***
## form-comp+super 2.77e-06 ***
## breaking-break+nonbreak:form-comp+super 1.40e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) brkn-+ frm-c+
## brkng-brk+n 0.647
## frm-cmp+spr -0.108 -0.166
## brkng-b+:-+ 0.000 0.019 0.005
## optimizer (nloptwrap) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.00265948 (tol = 0.002, component 1)
# As this still is singular, compare different optimizers with higher number of iterations
diff_optims <- allFit(model2, maxfun = 1e5)
## bobyqa :
## boundary (singular) fit: see help('isSingular')
## [OK]
## Nelder_Mead : [OK]
## nlminbwrap :
## boundary (singular) fit: see help('isSingular')
## [OK]
## nloptwrap.NLOPT_LN_NELDERMEAD :
## boundary (singular) fit: see help('isSingular')
## [OK]
## nloptwrap.NLOPT_LN_BOBYQA :
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00265948 (tol = 0.002, component 1)
## [OK]
# Filter the results
diff_optims_OK <- diff_optims[sapply(diff_optims, inherits, "lmerMod")]
lapply(diff_optims_OK, function(x) x@optinfo$conv$lme4$messages)
## $bobyqa
## [1] "boundary (singular) fit: see help('isSingular')"
##
## $Nelder_Mead
## NULL
##
## $nlminbwrap
## [1] "boundary (singular) fit: see help('isSingular')"
##
## $nloptwrap.NLOPT_LN_NELDERMEAD
## [1] "boundary (singular) fit: see help('isSingular')"
##
## $nloptwrap.NLOPT_LN_BOBYQA
## [1] "Model failed to converge with max|grad| = 0.00265948 (tol = 0.002, component 1)"
# Extract convergence information from the results
convergence_results <- lapply(diff_optims_OK, function(x) x@optinfo$conv$lme4$messages)
# Identify working indices
working_indices <- sapply(convergence_results, is.null)
if (sum(working_indices) == 0) {
print("No algorithms from allFit converged!")
first_fit <- NULL
} else {
# Select the first fit with convergence
first_fit <- diff_optims[working_indices][[1]]
}
# Display the first fit with convergence
summary(first_fit)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: score ~ breaking * form + (1 + breaking + form | participant)
## Data: table.model
## Control: ctrl
##
## REML criterion at convergence: 1462.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.0468 -0.2589 0.1329 0.3365 3.1366
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.19310 0.4394
## breaking-break+nonbreak 1.00472 1.0024 0.99
## form-comp+super 0.07781 0.2789 -0.43 -0.53
## Residual 0.93518 0.9670
## Number of obs: 488, groups: participant, 61
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 4.01075 0.07133 64.42715 56.231
## breaking-break+nonbreak -1.62850 0.15539 62.60462 -10.480
## form-comp+super 0.48584 0.09482 66.58945 5.124
## breaking-break+nonbreak:form-comp+super 1.16126 0.17577 364.25689 6.607
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## breaking-break+nonbreak 2.10e-15 ***
## form-comp+super 2.77e-06 ***
## breaking-break+nonbreak:form-comp+super 1.40e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) brkn-+ frm-c+
## brkng-brk+n 0.647
## frm-cmp+spr -0.108 -0.166
## brkng-b+:-+ 0.000 0.019 0.005
confint(first_fit)
## Computing profile confidence intervals ...
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in FUN(X[[i]], ...): non-monotonic profile for .sig03
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): Last two rows have
## identical or NA .zeta values: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in nextpar(mat, cc, i, delta, lowcut, upcut): unexpected decrease in
## profile: using minstep
## Warning in FUN(X[[i]], ...): non-monotonic profile for .sig05
## Warning in confint.thpr(pp, level = level, zeta = zeta): bad spline fit for
## .sig03: falling back to linear interpolation
## Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
## Warning in confint.thpr(pp, level = level, zeta = zeta): bad spline fit for
## .sig05: falling back to linear interpolation
## Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
## 2.5 % 97.5 %
## .sig01 0.3247047 0.5697599
## .sig02 0.8814156 0.9978656
## .sig03 -0.9250361 -0.3966850
## .sig04 0.7616279 1.2784765
## .sig05 -1.0000000 0.4058977
## .sig06 0.0000000 0.5456185
## .sigma 0.9004380 1.0353631
## (Intercept) 3.8699746 4.1517228
## breaking-break+nonbreak -1.9353934 -1.3216138
## form-comp+super 0.2984930 0.6726168
## breaking-break+nonbreak:form-comp+super 0.8167442 1.5057628
# load in data
table.rawscores <- read.csv("data/Frisian_Breaking_Fulldata.csv", stringsAsFactors = TRUE)
#head(table.rawscores)
table_simple <- table.rawscores[, c(
"Participant",
"Fier.comp.broken",
"Fier.comp.nonbroken",
"Fier.super.broken",
"Fier.super.nonbroken",
"Swier.comp.broken",
"Swier.comp.nonbroken",
"Swier.super.broken",
"Swier.super.nonbroken"
)]
# add clean sequential participant label for this appendix table only
table_simple$Participant_new <- paste0("participant", seq_len(nrow(table_simple)))
write.csv(table_simple, "raw_scores_table.csv", row.names = FALSE)