How do I control for variables in a linear regression?

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
samwise
Posts: 3
Joined: Wed Apr 22, 2020 9:45 pm

How do I control for variables in a linear regression?

Post by samwise »

Hi!

I'm trying to do a linear regression while controlling for several variables (gender, age, etc). What's the process for doing that?

Thank you so much!
User avatar
jonathon
Posts: 2620
Joined: Fri Jan 27, 2017 10:04 am

Re: How do I control for variables in a linear regression?

Post by jonathon »

hi,

you just add them in as factors or covariates.

cheers

jonathon
samwise
Posts: 3
Joined: Wed Apr 22, 2020 9:45 pm

Re: How do I control for variables in a linear regression?

Post by samwise »

Got it, thank you so much!
User avatar
jonathon
Posts: 2620
Joined: Fri Jan 27, 2017 10:04 am

Re: How do I control for variables in a linear regression?

Post by jonathon »

actually sam, what i've said isn't quite correct. you can easily control for continuous variables by including them as a covariate in a linear regression. but if you want to include 'random factors', you'll need to use the 'mixed effects models' in GAMLj. you can read up on the difference between fixed and random factors, and GAMLj will be the ticket.

cheers

jonathon
Post Reply