interaction

Combine plots in R

馋奶兔 提交于 2021-02-08 09:54:41
问题 I have several plots that I want to combine them together and add a title to the combined plot, but somehow I cannot combine them using R. (using RStudio) Combine two residual plots plotted by using plot(resid(lme)) where lme is a linear mixed model. Combine two interaction plots plotted by using interaction.plot(x1,x2,y) where x1 and x2 are the two independent variables, and y is the dependent variable. I tried to store the plots as variables and use grid.arrange , but they cannot be stored

R: Special contrasts within an interaction effect

烂漫一生 提交于 2021-02-07 20:50:46
问题 Within the context of a 2-way ANOVA, I would like to enter contrast levels for one factor (10, 20, 30 degrees) within levels of another factor (SpeciesA, SpeciesB). This assumes the interaction effect is significant so the contrasts cannot simply be done on the temperature main effect. I have attempted to do this within EZanova, multcomp and phia, but have been unable to figure out a syntax that works. Have I missed a package that allows this? Contrast and coefficients Contrast1: Does 10

R: Special contrasts within an interaction effect

给你一囗甜甜゛ 提交于 2021-02-07 20:49:14
问题 Within the context of a 2-way ANOVA, I would like to enter contrast levels for one factor (10, 20, 30 degrees) within levels of another factor (SpeciesA, SpeciesB). This assumes the interaction effect is significant so the contrasts cannot simply be done on the temperature main effect. I have attempted to do this within EZanova, multcomp and phia, but have been unable to figure out a syntax that works. Have I missed a package that allows this? Contrast and coefficients Contrast1: Does 10

How to make a spaghetti plot in R?

China☆狼群 提交于 2021-01-28 06:59:48
问题 I have the following: heads(dataframe): ID Result Days 1 70 0 1 80 23 2 90 15 2 89 30 2 99 40 3 23 24 ect... what I am trying to do is: Create a spaghetti plot with the above datast. What I use is this: interaction.plot(dataframe$Days,dataframe$ID,dataframe$Result,xlab="Time",ylab="Results",legend=F) but none of the patient lines are continuous even when they were supposed to be a long line. Also I want to convert the above dataframe to something like this: ID Result Days 1 70 0 1 80 23 2 90

NA values when regressing with dummy variable interaction term

风流意气都作罢 提交于 2020-12-30 03:36:05
问题 I'm trying to estimate factors that determine the difference in happiness level between people living in New York and Chicago. Data looks like below. Happiness City Gender Employment Worktype Holiday 1 60 New York 0 0 Unemployed Unemployed 2 80 Chicago 1 1 Whitecolor 1 day a week 3 39 Chicago 0 0 Unemployed Unemployed 4 40 New York 1 0 Unemployed Unemployed 5 69 Chicago 1 1 Bluecolor 2 day a week 6 90 Chicago 1 1 Bluecolor 2 day a week 7 100 New York 0 1 Whitecolor 2 day a week 8 30 New York

Record Bash Interaction, saving STDIN, STDOUT seperately

烈酒焚心 提交于 2020-12-05 11:49:25
问题 So I want to record my bash interaction, which I know I can do with script, or ttyrec. Except I want one feature more than they have. Save input (i.e STDIN), and output (i.e. STDOUT) separately. So something like (where I typed the first "Hello World!"), except of course script takes one [file] arg, not two: user@pc:~$ script input.txt output.txt Script started user@pc:~$ paste > textfile.txt Hello World! user@pc:~$ cat textfile.txt Hello World! user@pc:~$ exit Script done So input.txt looks