Quantcast

Modeling regressions with 2 DV's?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Modeling regressions with 2 DV's?

Edward H Patzelt
Hi R project,

I have a data set (see below) where I have 2 parameters estimated from a
computational model ("lowStakesW", "highStakesW") which represent 2
separate conditions in the experiment. I would like to find out the
relationship of the variable "compulsiveIntrusive" to each of these
conditions ("lowStakesW", "highStakesW").

Do I model an interaction in the DV:

lme((lowStakesW*highStakesW) ~ compulsiveIntrusive + (age + genderTotal +
IQ) , data = data, random = ~ 1 | subject, na.action = na.omit, method =
"ML")

or alternatively, reformat the data to a long format with 2 rows for each
subject and model the "stakes" as a factor? (when I do this it can't
estimate the coefficients)



structure(list(compulsiveIntrusive = c(2.18937963752221, 1.29096892796289,
2.51831554859146, 2.43060016848778, 1.57614819291028, 1.75121219866719,
2.99144667879001, 4.74399673935091, 1.03054126068731, 1.99784375854779,
1.35461253095473, 2.26360948518013, 1.62377445817051, 1.35932322358476,
2.04000412136899, 1.5900455870051, 3.06948431322046, 1.94661260373863,
2.2572276471116, 2.79743033120073), lowStakesW = c(0.733710338106936,
0, 1, 0.257321035855335, 0.780270122098848, 0, 0, 0.934177492567927,
1, 0.595435858091935, 0.838657946021969, 1, 0.891978169296885,
0.750837363915553, 0.797155118780438, 0, 0.648507902264236, 1,
0.856440481475081, 0.547093456389246), highStakesW = c(1, 0,
0.794942129347966, 0.375548142583892, 0.636201082644207, 1, 0,
0.45392263824212, 0.532547871760986, 1, 1, 0.708909875170169,
1, 0.863742838985097, 0.553236337037592, 1, 0.669248271910537,
1, 1, 0.655973113591005), genderTotal = structure(c(1L, 2L, 2L,
2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,
2L), .Label = c("f", "m"), class = "factor"), IQ = c(103.89052,
99.7076935, 85.723885, 109.358215, 92.841325, 107.20297, 96.952615,
77.37235, 83.6863, 115.8529, 101.0889415, 96.952615, 92.63521,
74.7073, 95.476285, 81.3889, 113.988445, 113.975365, 105.61399,
98.03281), age = c(54, 29, 38, 21, 31, 47, 28, 35, 36, 57, 34,
29, 44, 34, 22, 26, 31, 27, 32, 42), subject = c("subject_1",
"subject_2", "subject_3", "subject_4", "subject_5", "subject_6",
"subject_7", "subject_8", "subject_9", "subject_10", "subject_11",
"subject_12", "subject_13", "subject_14", "subject_15", "subject_16",
"subject_17", "subject_18", "subject_19", "subject_20")), .Names =
c("compulsiveIntrusive",
"lowStakesW", "highStakesW", "genderTotal", "IQ", "age", "subject"
), row.names = c(NA, 20L), class = "data.frame")

--
Edward H Patzelt | Clinical Science PhD Student
Psychology | Harvard University
*Computational Cognitive Neuroscience Laboratory
<http://gershmanlab.webfactional.com/>*

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...