#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

# Continuous Independent and Categorical dependent variable

Hi,

I have a continuous independent variable and categorical dependent variables with 2 and 3 levels. Which test should I use in Jasp? If random and fixed effects are involved, could I use participant number as a random effect?

Thanks!

Raquel

• Dear Raquel,

Just to get this straight (because it is a little unusual): you have one continuous variable (say income) and you use this to predict two categorical variables (say gender scored as male, female; and haircolor, scored as black, brown, blond)? Usually it is the other way around, and the categorical ones are the predictor variables, in which case you'd have a straightforward two-factorial ANOVA...

Cheers,

E.J.

• Dear E.J.,

Thank you for your message. So, yes, this is also confusing to me. The situation is this:

I have scores on 5 measures of impulsivity, which are (sort of) continuous. They each range from 4 to 20. We want to see if these scores predict whether people wear a mask (0,1) and practice social distancing (0,1,2 - no, a bit, yes 100%).

Since we didn't manipulate anything experimentally, I didn't feel totally bad about doing an ANOVA as you also suggested. But I was still left wondering if this is OK, since it feels like the independent variable should be impulsivity and not mask use.

In your example the (arguably) most fixed properties are the categorical variables, whereas is our study its the continuous variable. You see what I mean?

Thanks,

Raquel

• Hi, @raquel.

From your answer to @EJ, I understand that you have 5 censored variables (with a score of 4 to 20) which you would treat as continuous variables and two categorical variables.

It's right?

With binary logistic regression, you can predict whether people will wear or not face masks.

Mask (DV), the 5 variables for impulsivity (Covariates), the practice social distancing variable (Factors).

Cheers,

Maurizio

• Dear Maurizio,

Thanks for your answer, that's very helpful. I have one additional question: In your description you put social distancing as factor and mask use as DV, but I would actually like to treat both as dependent variable. I would like to predict both with the 5 variables for impulsivity. Is this possible?

Thanks again,

Raquel

• Hi, @raquel.

In Jasp (at the moment) there is no possibility for an Ordinal Logistic Regression, which would allow you to use "practice social distancing" variable as (DV) and the Mask variable as (Factor), but there would be no particular changes in interpreting the resulting model compared to that of the binary logistic regression. With the BLR suggested to predict the use of the Mask (indicated with 1 in the variable), you will have coefficients (Estimate) to be included in your probability formula, which for the 5 covariates, are the values for the increment of one unit of the variable, while for the "practice social distancing" variable, the exponential of the coefficient is Odds Ratio.

To interpret the odds ratios of "practice social distancing" it must be borne in mind that the value 0 of the continuous variables and the first factorial level of the categorical variable serve as the reference class for the model and (Intercept) describes the probabilities for this reference class . In your case you have 5 continuous variables "measures of impulsivity" and "practice social distancing" as the categorical variable. Therefore the reference class will be for subjects with (impulsivity measures = 0) and (practical social distancing = 0, i.e. NO). For example for (Intercept) you have OR = 10.5, the probability of wearing the mask was approximately 10.5 to 1, which means that their probability of wearing the mask was 10.5 times their probability of not wearing it. The model will also report you OR for the other two levels of "practice social distancing" (a bit vs. no) and (yes 100% vs. no). For "practice social distancing" you can indicate the level to be used as a reference class.

You may be interested in watching this video for BLR with Jasp.

Cheers,

Maurizio.

• Hi Maurizio,

Thank you for your extensive explanation and the link to the video, that's very helpful. I saw the video and then reread your comments, but I think I am missing some piece of knowledge. Before I dig further I just want to make sure that we have understood each other correctly.

I have indeed 5 censored variables (with a score of 4 to 20) which I would treat as continuous predictor variables and two categorical dependent variables.

As I understand it, it is not currently possible to use social distancing as a dependent variable, because it is not binary. Are you suggesting a workaround here?

What confuses me is that you put the dependent variable "social distancing" as factor. I want to predict both mask use ánd social distancing by using the impulsivity scores as predictor. I am not interested in predicting mask use by using social distancing as predictor.

I apologize for reiterating and thanks for your patience.

Raquel

• Hi, @raquel.

No problem, repeating is good and helps to clarify and understand better.

I understood your question, but in the introduction you were asking which test statistic to use in Jasp (i.e. something that is already available and maybe with good output, ready to use).

For this I suggested binary logistic regression (available in jasp), which by correctly interpreting the OR, could give you the answer you were looking for.

If you are looking for a test statistic in jasp and cannot find it, with the use of the R module (even if still in beta) you can find and use some scripts in R to answer the need.

Considering that there are no tests for two categorical DV, I would suggest you consider the creation of a new categorical variable with 6 levels, as a combination of the levels of the two catoric variables (mask and social_distancing).

Suppose its name is new_msd with 6 levels, where:

5 (disguises himself/a little social_distancing)

With the new categorical variable and the 5 continuous variables, you could perform a Discriminant Analysis as an alternative to the LR.

The Discriminant Analysis is not found in jasp, but with a few lines of R code, you can get it in the R (beta) module present.

Discriminant Analysis is used when you have one or more normally distributed (IV) and a categorical (DV). It is a multivariate technique that considers latent dimensions in independent variables to predict group membership in the categorical dependent variable.

For example, using the data, let's say we want to use the five impulsivity variables to predict the type of group a subject will belong to (new_msd).

Cheers,

Maurizio.