Conflict resolution initial findings #1: which values and norms matter the most when it comes to sharing location?

I’m still quite busy analyzing the large dataset (~1600 cases) collected from the conflict resolution online user study conducted earlier this year. Before delving into detailed model building, and findings related to specific types of normative conflicts, I thought I’d present two simple yet quite clear findings that appeared upon the initial inspection of the data:

1. Which of the five values in the experiment were found to matter the most, in the general sense?

We have asked participants to use a pie chart to indicate, in the general sense, and assuming a role (either a parent or a child), their preference for five human values that we found to matter the most in the location sharing domain. Below was the description we provided for these values.

Friendship: for you, or your family members to build friendships, a social life, and be recognized amongst others in the social circle.

Privacy: for you, or your family members to be free from unwanted outside intrusion, and undesirably shared information.

Safety: for you, or your family members to be free from dangers or harm.

Independence: for you, or your family members to be capable of doing what they need to do without other’s control or support.

Responsibility: for you, or your family members to know and be able to do the tasks they’re expected to do.

The pie chart below shows how, on average, users ranked the importance of these values:


What I find interesting is that (1) the fact that there was a significant preference for some values over others and (2) that privacy, long considered a pivotal value in social data sharing (especially location!), was ranked lowest. Now, the domain of the experiment is indeed family life, so that makes this finding a little less surprising, yet still interesting as privacy ranked last amongst all five values, not just second to safety, the expected winner.

2. Obligations vs. Prohibitions (to share and receive data)?

Throughout the experiment we asked participants to create conflicting normative statements regarding sharing and receiving location, and we then asked them to indicate their preference (and by how much, using a slider), in the case a conflict occurs. Now, a conflict always included an obligation commitment (e.g. I want someone to share/receive data with/from me/somebody else under some circumstances), and a prohibition (e.g. I want someone to not share/receive data with/from me/somebody else under some circumstances). Again, before going into details on predicting user preference using statistical models, another simple yet clear finding presented itself upon early data inspection:


Data here was modified so that all obligations are to the left side (negative values), and all prohibitions are to the right side (positive values). In the experiment itself the order of course was random. We can see that there is a clear tendency for obligations of sharing and receiving data to be preferred to prohibitions. If we make this discrete, obligations were preferred around 63% of the time:


So, and without drawing any detailed conclusion yet, these two simple findings could alone increase prediction accuracy in conflict resolution in location sharing, by quite some margin.


Specifying correlation matrices for longitudinal models in R

Specifying correlation matrices in various data analysis packages for longitudinal data in R (e.g. geepack, nlme) can be quite confusing, especially if the model converges with its default correlation matrix and therefore subjecting your analysis to certain assumptions. Here are various ways you can specify a correlation matrix, depending on the package.

In geepack, you can use the variable “constr”:

gee.model <- geeglm(response ~ fixed, id = rand,
data = yourData, family=gaussian, corstr="unstructured")

In nlme, it can be a little more complicated. You can start by specifying and initializing the matrix:

corMatrix <- corSymm(form = ~1|rand)
corMatrix <- Initialize(matrix, data = yourData)

And then, you can assign the initialized matrix to your model. Note that there has to be a match between the formula in your matrix and the random effect structure.

lme.model <- lme(response ~ fixed, random = ~1|rand,
data = yourData, correlation = corMatrix)

p.s. The R package “lmer” still, as of the writing of this post, does not support a custom correlation matrix.

Mixed models with nested random effects in R

Once again, SPSS failed me miserably while trying to run my mixed, multilevel model below:

nested model

The first two levels, BSO(i.e. day care center) and pp (participant) are nested random effects. As the model shows, each participant’s “emotional” or behavioral code (e.g. engaged, excited, bored, …) was sampled several times, during two sessions (once for each of the app’s two versions). SPSS failed to allow me to build this model properly, mostly failing to comprehend that random effects have more than one level.

So I turned to R and found several, very interesting (though maybe a bit long to read) tutorials using the package lme4, so credit goes to Bodo and Ben for their extensive effort into simplifying what could be a very complex process.

The way it worked for me is below, described in an overly simplified way.

require(xlsx) #to read excel sheets
require(lme4) #the package
Behavioral <- read.xlsx("behavioral", 1) #the data set

#certain things we need to ensure are treated as factors
#default is covariants
Behavioral$version = as.factor(Behavioral$version)
Behavioral$pp = as.factor(Behavioral$pp)

#first we construct the null model
#emotion type as response with no fixed factors
#and a nested BSO and pp as random factors
model.null <-lmer(emo.type ~ 1 + 1|BSO/pp, data = Behavioral, REML=FALSE)

#we then construct our model, adding version as fixed factor
model <-lmer(emo.type ~ version + 1|BSO/pp, data = Behavioral, REML=FALSE)

#see summaries of the models here
summary (model.null)
summary (model)

#to obtain the p-value, i.e. to see if adding
#the fixed factor made a significant difference

#and finally
#will generate a bibtex entry so you cite the authors of the package!

Generalized Estimating Equations (GEE) models using R

I’ve been having the feeling lately that using SPSS for running multilevel analysis may not be the greatest idea. I had to switch to something that is more robust and better documented. Enter R: free, open source, greatly documented, tons of well maintained packages, great for both simple and complex analyses, mathematics in general, plotting capabilities, as well as pretty much anything you would have used MATLAB to do.

Here’s a quick explanation on how to perform the same analysis in here which was done using SPSS, this time using R. The package I’m using here is geepack, and It’s documented here.

require(xlsx) #to read excel sheets
require(geepack) #the gee package

#reading my data file in excel, with a first row of column headers
J1 <- read.xlsx("J1\ multimodel.xlsx", 1)

#making sure I read my predictors as factors
#default would treat them as covariates.
J1$N <- as.factor(J1$N)
J1$A <- as.factor(J1$A)
J1$Cr <- as.factor(J1$Cr)
J1$Cd <- as.factor(J1$Cd)

#constructing the model:
#slider as response,
#N, A, Cr, and CD as fixed effects
#and pp as random effect
#with slider's distribution as gaussian
# and an unstructured covariance matrix
gee01 <- geeglm (slider ~ N*A*Cr*Cd,
id =pp, data = J1,

#and finally, to see the results:

CCS: more qualitative data analysis

Have performed more qualitative data analysis using collected CCS data. Results show that our normative concept can actually model the domain’s requirements pretty well! In the transcribed audio, we found 12 normative statements spoken by parents and children, and our normative concept model (source, target, norm, trigger, expiry, deadline) is capable of expressing 11 out of these 12. Examples include:

Normative statement: parent says, if five minutes pass after the start of class, and a child isn’t there, the school should call the parents.

Expressed through the model: <parent, teacher, obligation(call parent), child not in school after 5 mins, child is in school, ASAP>.


Qualitative data analysis using Grounded Theory

Have spent quite some time with qualitative data analysis, using the data collected from my focus groups data here, Grounded Theory, and NVivo software (which we luckily had a license for at the group). Using the 50+ page data of audio transcripts from the three focus groups, I’ve done several rounds of (open, selective, and axial) coding, which ended with a “tree of codes” grouped into themes or categories. These themes represent quite well the social context of the family life domain in the area where we did these user studies. Check out the “tree of codes” below.


NN median target predictions and how M5 charts react to them

To me, the target predictions (in blue), which were taken from a NARX neural network predicting the median price of the H4 bars of this USDCAD data, do not look like targets but more like support/resistance lines. Every 48 M5 closing points (one H4 closing point) the target price is updated with the network’s prediction.

I can’t make out what to possibly use this for, but they could be used as support/resistance guides. Any suggestions?