Can you have 2 Dependant variables?

Variables:

A variable is what is measured or manipulated in an experiment. Variables provide the means by which scientists structure their observations. Identifying the variables in an experiment provides a solid understanding of the experiment and what the key findings in the experiment are going to be.

To identify the variables, read the lab procedure described in the lab manual. Determine what you will be measuring and what you will be manipulating for each measurement. The value(s) you are manipulating is called the independent variable (see definition below) and the value(s) you are observing/recording is called the dependent variable (see definition below). Write down the dependent and independent variables.In more advanced labs, you may have multiple variables (see definition below), more than one independent and dependent variable

Independent and Dependent Variables:
An independent variable is the variable you have control over, what you can choose and manipulate. It is usually what you think will affect the dependent variable. In some cases, you may not be able to manipulate the independent variable. It may be something that is already there and is fixed, something you would like to evaluate with respect to how it affects something else, the dependent variable like color, kind, time.

A dependent variable is what you measure in the experiment and what is affected during the experiment. The dependent variable responds to the independent variable. It is called dependent because it "depends" on the independent variable. In a scientific experiment, you cannot have a dependent variable without an independent variable.

Example: You are interested in how stress affects heart rate in humans. Your independent variable would be the stress and the dependent variable would be the heart rate. You can directly manipulate stress levels in your human subjects and measure how those stress levels change heart rate.

Multiple Variables:
It is possible to have experiments in which you have multiple variables. There may be more than one dependent variable and/or independent variable. This is especially true if you are conducting an experiment with multiple stages or sets of procedures. In these experiments, there may be more than one set of measurements with different variables.

Example: You are interested in finding out which color, type, and smell of flowers are preferred by butterflies for pollination. You randomly choose an area you know to be inhabited by butterflies and note all the species of flowers in that area. You want to measure pollination of flowers by butterflies, so your dependent variable is pollination by butterflies. The independent variables are flower color, type, and smell. You will need to specify relationships for each of these independent variables with the dependent variable.


Problem

I want to run a linear regression with multiple dependent variables, but the Linear Regression dialog box only allows specification of a single dependent variable. When I write REGRESSION command syntax with multiple dependent variables, I get a series of separate univariate regression models, instead of the desired single multivariate multiple regression model. Can SPSS fit a multivariate multiple regression model?

Resolving The Problem

Yes, but not in the REGRESSION procedure. The GLM procedure (Analyze->General Linear Model->Multivariate in the menus) will fit a multivariate multiple regression model. Quantitative ("continuous") predictors should be entered as covariates; they will be handled as they are in REGRESSION, entered into the equation without any form of internal recoding or transformation. Categorical predictors can be entered as factors, which will be represented in the model as sets of dummy or indicator variables. Note that by default the GLM procedure will fit all interactions among factor variables. Also, parameter estimates or regression coefficients are not default output in GLM and need to be specifically requested (via the STATISTICS subcommand or the Options dialog box in the menus).

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

$\begingroup$

Is it possible to have a (multiple) regression equation with two or more dependent variables? Sure, you could run two separate regression equations, one for each DV, but that doesn't seem like it would capture any relationship between the two DVs?

asked Nov 14, 2010 at 2:50

Can you have 2 Dependant variables?

$\endgroup$

1

$\begingroup$

Yes, it is possible. What you're interested is is called "Multivariate Multiple Regression" or just "Multivariate Regression". I don't know what software you are using, but you can do this in R.

Here's a link that provides examples.

Can you have 2 Dependant variables?

answered Nov 14, 2010 at 3:32

BrettBrett

5,8463 gold badges30 silver badges41 bronze badges

$\endgroup$

3

$\begingroup$

@Brett's response is fine.

If you are interested in describing your two-block structure, you could also use PLS regression. Basically, it is a regression framework which relies on the idea of building successive (orthogonal) linear combinations of the variables belonging to each block such that their covariance is maximal. Here we consider that one block $X$ contains explanatory variables, and the other block $Y$ responses variables, as shown below:

Can you have 2 Dependant variables?

We seek "latent variables" who account for a maximum of information (in a linear fashion) included in the $X$ block while allowing to predict the $Y$ block with minimal error. The $u_j$ and $v_j$ are the loadings (i.e., linear combinations) associated to each dimension. The optimization criteria reads

$$ \max_{\mid u_h\mid =1,\mid v_h\mid =1}\text{cov}(X_{h-1}u_h,Yv_h)\quad \big(\equiv \max\text{cov}(\xi_h,\omega_h)\big) $$

where $X_{h-1}$ stands for the deflated (i.e., residualized) $X$ block, after the $h^\text{th}$ regression.

The correlation between factorial scores on the first dimension ($\xi_1$ and $\omega_1$) reflects the magnitude of the $X$-$Y$ link.

answered Nov 15, 2010 at 0:34

chlchl

51.7k19 gold badges211 silver badges370 bronze badges

$\endgroup$

1

$\begingroup$

Multivariate regression is done in SPSS using the GLM-multivariate option.

Put all your outcomes (DVs) into the outcomes box, but all your continuous predictors into the covariates box. You don't need anything in the factors box. Look at the multivariate tests. The univariate tests will be the same as separate multiple regressions.

As someone else said, you can also specify this as a structural equation model, but the tests are the same.

(Interestingly, well, I think it's interesting, there's a bit of a UK-US difference on this. In the UK, multiple regression is not usually considered a multivariate technique, hence multivariate regression is only multivariate when you have multiple outcomes / DVs.)

answered Mar 22, 2013 at 21:42

Can you have 2 Dependant variables?

Jeremy MilesJeremy Miles

15.2k6 gold badges34 silver badges67 bronze badges

$\endgroup$

1

$\begingroup$

I would do this by first transforming the regression variables to PCA calculated variables, and then I would to the regression with the PCA calculated variables. Of course I would store the eigenvectors to be able to calculate the corresponding pca values when I have a new instance I wanna classify.

answered Nov 14, 2010 at 9:43

mariana soffermariana soffer

1,1012 gold badges15 silver badges18 bronze badges

$\endgroup$

7

$\begingroup$

As mentionned by caracal, you can use mvtnorm package in R. Assuming you made a lm model (named "model") of one of the response in your model, and called it "model", here is how to obtain the multivariate predictive distribution of several response "resp1", "resp2", "resp3" stored in a matrix form Y:

library(mvtnorm)
model = lm(resp1~1+x+x1+x2,datas) 
         # this is only a fake model to get
                                  #the X matrix out of it
Y = as.matrix(datas[, c("resp1", "resp2", "resp3")])
X =  model.matrix(delete.response(terms(model)), 
           data, model$contrasts)
XprimeX  = t(X) %*% X
XprimeXinv = solve(xprimex)
hatB =  xprimexinv %*% t(X) %*% Y
A = t(Y - X%*%hatB)%*% (Y-X%*%hatB)
F = ncol(X)
M = ncol(Y)
N = nrow(Y)
nu= N-(M+F)+1 #nu must be positive
C_1 =  c(1  + x0 %*% xprimexinv %*% t(x0)) 
     # for a prediction of the factor setting x0 
     # (a vector of size F=ncol(X))
varY = A/(nu) 
postmean = x0 %*% hatB
nsim = 2000
ysim = rmvt(n=nsim, delta=postmux0, C_1*varY, df=nu) 

Now, quantiles of ysim are beta-expectation tolerance intervals from the predictive distribution, you can of course directly use the sampled distribution to do whatever you want.

To answer Andrew F., degrees of freedom are hence nu=N-(M+F) + 1 ... N being the # of observations, M the # of responses and F the # of parameters per equation model. nu must be positive.

(You may want to read my work on in this document :-) )

Can you have 2 Dependant variables?

answered Oct 8, 2015 at 20:07

Can you have 2 Dependant variables?

$\endgroup$

$\begingroup$

Did you already come across the term "canonical correlation"? There you have sets of variables on the independent as well as on the dependent side. But maybe there are more modern concepts available, the descriptions I have are all of the eighties/nineties...

answered Nov 15, 2010 at 19:59

Can you have 2 Dependant variables?

$\endgroup$

2

$\begingroup$

For Bayesian multivariate regression, one can use R package BNSP. For example, the dataset ami that comes with the package includes 3 responses and 3 covariates.

# First load the package and dataset
require(BNSP)
data(ami)

# Second, centre and scale variables - 
# this is specific to the dataset
sc <- function(x){return((x-mean(x))/sd(x))}
ami$ratio <- sc(log(ami$ami)-log(ami$tot))
ami$tot <- sc(log(ami$tot))
ami$amt <- sc(log(ami$amt)) 
ami$pr <- sc(ami$pr)
ami$qrs <- sc(ami$qrs)
ami$bp <- sc(ami$bp)

##Third, define the mode: on the left of ~ 
# are the 3 responses, separated by |. 
# On the right of ~ is the model for the mean that 
# includes smooth functions sm
# of the 3 covariates: amt, tot, and ratio  

model <- pr | qrs | bp ~ sm(amt, k = 5) + sm(tot, k = 5) + 
           sm(ratio, k = 5) 

#Fourth, fit the model
multiv <- mvrm(formula = model, data = ami, sweeps = 10000, 
            burn = 5000, thin = 2, seed = 1, 
             StorageDir = getwd())

# And last, plot the fitted curves and estimated 
# correlation matrix
plot(multiv, nrow = 3)
plotCorr(multiv)

Results are shown below. For the correlation matrix, the plot of the left shows posterior means and the one on the right posterior credible intervals.

Can you have 2 Dependant variables?
Can you have 2 Dependant variables?

Can you have 2 Dependant variables?

answered May 6, 2021 at 11:24

papgeopapgeo

3022 silver badges11 bronze badges

$\endgroup$

$\begingroup$

It's called structural equation model or simultaneous equation model.

answered Nov 14, 2010 at 10:44

ShigeShige

3471 silver badge2 bronze badges

$\endgroup$

2

How many dependent variables can you have?

A well-designed experiment normally incorporate one or two independent variables, with every other possible factor eliminated, or controlled. There may be more than two dependent variables in any experiment.

Can there be two dependent variables in regression?

Yes, it is possible. What you're interested is is called "Multivariate Multiple Regression" or just "Multivariate Regression".

Can you measure two dependent variables?

When multiple dependent variables are different measures of the same construct—especially if they are measured on the same scale—researchers have the option of combining them into a single measure of that construct.

Can you have one IV and two DVS?

It's perfectly fine to have more than one DV in a study, just as it is to have more than one independent variable (IV) in the study. These are typical of real-world studies, which analyze interaction and interdependency of multiple factors and variables and are meant to yield rich insights.