Dyadic repeated measures with moderation - how to analyze?


I want to test the effects of the emotions expressed in private online chats between males and females (dyadic chats) on the female's satisfaction from the chat. And to test how some factors may moderate these effects (for example, the length of the chat or the topic of the chat).

I asked participants to read 500 online chats and to a) rate the emotions expressed in every line of each chat, b) categorize the chats into topics. I asked other participants to rate the females' satisfaction from each chat. Note that in each chat, each interlocutor writes one line each time (i.e., chat lines are always male-female-male-female, etc.).

Below is an excerpt from the data (also attached as .xlsx), containing 2 emotions for each interlocutor (happiness and disappointment for males, sadness and cheerfulness for females) in ten 4-line chats, and the females' satisfaction from the chats:

Full size image: http://s5.postimg.org/vojllgdyv/image.png

For example, in chat 2, line 1, the male expressed only (slight) happiness (2; emotions rated on a scale of 0-5). In line 2, the female expressed only (moderate) sadness (3). In line 3, the male expressed no emotion. In line 4, the female expressed only moderate sadness (3). The topic of the chat was 2 (categorical), and the female was fairly satisfied (4; satisfaction rated on a scale of 1-7) from the chat.

Also please note this is a sample of 4-line chats, but my chats vary in length (4, 6, 8, or 10 lines). Also, there are more emotions except the ones in this sample, and the emotions are different for males and females (males 5 emotions; females 9 emotions).

I think what I have is some kind of dyadic repeated measures (or time series?), but I don't know if I'm right, and even if I am, I don't know where to look - or what to look for - to learn more so I can analyze the data.

Also, I'm confused because the independent and dependent variables are at different levels of analysis: The emotions (independent variables) are at the line-level, whereas the female's satisfaction (dependent variable) is at the chat-level.

Can anyone please help? Thanks.

Using R and SPSS.

Here is some R code for reproducing purposes:

data <- as.data.frame(matrix(c(1:10,4,2,4,3,2,1,3,1,4,4,rep(4,10),
colnames(data) <- c("id","topic","lines","m_happy_line1","m_disappoint_line1",