SlideShare uma empresa Scribd logo
1 de 7
ANÁLISE MULTIVARIADA DE DADOS
CURSO DE GESTÃO DE MARKETING
DOCENTE: CARLA OLIVEIRA SILVA
REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS
CATEGÓRICAS
 Vimos até agora que as variáveis independentes que são
consideradas na regressão linear múltipla são sempre variáveis
quantitativas.
Mas não é possível usar variáveis categóricas nos modelos de
regressão múltipla?
 As variáveis categóricas (nominais ou ordinais) só podem ser
utilizadas em regressão múltipla depois de convertidas em
variáveis dummy (fictícias), que são variáveis dicotómicas 0/1.
REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS
CATEGÓRICAS: VARIÁVEIS DUMMY
• Considere o ficheiro
‘Jornalistas TV’. A variável
‘Género’ (0 para homem e 1
para mulher) é uma variável
dummy, logo pode ser
incluída diretamente no
modelo
• A equação da reta de
regressão é dada por:
𝑦 = 469,535 + 62,916 𝑒𝑥𝑝𝑒𝑟𝑖ê𝑛𝑐𝑖𝑎 + 84,459𝑔é𝑛𝑒𝑟𝑜
Os resultados revelam que as
mulheres (género=1) recebem
mensalmente mais 84,459 € do
que os homens.
CRIAÇÃO DE VARIÁVEIS
DUMMY
Quando pretendemos incluir num
modelo de regressão múltipla uma
variável categórica que não está
codificada como 0/1, é necessário
criar uma variável dummy.
Um exemplo poderá
ser a criação de uma
variável dummy para a
tipologia, no ficheiro
“casas”. Distinguir a
tipologia numa
regressão múltipla com
o ficheiro casas
Transform
Create
dummy
variable
CRIAÇÃO DE VARIÁVEIS DUMMY
Na base de dados são criadas
variáveis 0/1 e no output é
possível é possível identificar a
variável criada e a tipologia que
esta representa.
REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS
CATEGÓRICAS: VARIÁVEIS DUMMY
Analisar
Regressão
Linear
Considere o ficheiro casas: pretende-se criar um modelo explicativo do
preço anunciado das casas. Vamos por exemplo considerar a área útil e
as dummies resultantes da tipologia.
REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS
CATEGÓRICAS: VARIÁVEIS DUMMY
Considere o modelo 2:
a equação para cada
uma das tipologias é:
YT2(pr anun) =183617,74 – 12428,724 + 1227,742 x (área útil)=171 189,016 +
1227,742 x
YT3(pr anun) =183617,74 + 1227,742 x (área útil)
YT4(pr anun) =183617,74 + 30266,835 + 1227,742 x (área útil) = 213 884,575 +
1227,742 x

Mais conteúdo relacionado

Último

Catálogo Bones de Four Jeans de 24 03 2024
Catálogo Bones de Four Jeans de 24 03 2024Catálogo Bones de Four Jeans de 24 03 2024
Catálogo Bones de Four Jeans de 24 03 2024mikaelfoxdevs
 
Catálogo Feminino Four Jeans de 03 04 2024
Catálogo Feminino Four Jeans de 03 04 2024Catálogo Feminino Four Jeans de 03 04 2024
Catálogo Feminino Four Jeans de 03 04 2024mikaelfoxdevs
 
Prova da PPL Enem reapliaçõ de 2023 com todas as questões
Prova da PPL Enem reapliaçõ de 2023 com todas as questõesProva da PPL Enem reapliaçõ de 2023 com todas as questões
Prova da PPL Enem reapliaçõ de 2023 com todas as questõesBeth282646
 
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdfRenandantas16
 
material sobre poesia de Hilda Hilst, poeta
material sobre poesia de Hilda Hilst, poetamaterial sobre poesia de Hilda Hilst, poeta
material sobre poesia de Hilda Hilst, poetaBeth282646
 
Identidade e Gênero A(1).pptkkkkkkkkkkkl
Identidade e Gênero A(1).pptkkkkkkkkkkklIdentidade e Gênero A(1).pptkkkkkkkkkkkl
Identidade e Gênero A(1).pptkkkkkkkkkkklWellington Sousa
 

Último (6)

Catálogo Bones de Four Jeans de 24 03 2024
Catálogo Bones de Four Jeans de 24 03 2024Catálogo Bones de Four Jeans de 24 03 2024
Catálogo Bones de Four Jeans de 24 03 2024
 
Catálogo Feminino Four Jeans de 03 04 2024
Catálogo Feminino Four Jeans de 03 04 2024Catálogo Feminino Four Jeans de 03 04 2024
Catálogo Feminino Four Jeans de 03 04 2024
 
Prova da PPL Enem reapliaçõ de 2023 com todas as questões
Prova da PPL Enem reapliaçõ de 2023 com todas as questõesProva da PPL Enem reapliaçõ de 2023 com todas as questões
Prova da PPL Enem reapliaçõ de 2023 com todas as questões
 
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf
019348000101011 (27)vvvvvvvvvvvvvvvvvvvvvvvvvvvv.pdf
 
material sobre poesia de Hilda Hilst, poeta
material sobre poesia de Hilda Hilst, poetamaterial sobre poesia de Hilda Hilst, poeta
material sobre poesia de Hilda Hilst, poeta
 
Identidade e Gênero A(1).pptkkkkkkkkkkkl
Identidade e Gênero A(1).pptkkkkkkkkkkklIdentidade e Gênero A(1).pptkkkkkkkkkkkl
Identidade e Gênero A(1).pptkkkkkkkkkkkl
 

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

AMD - Aula n.º 10 - reg linear múlt - dummy.pptx

  • 1. ANÁLISE MULTIVARIADA DE DADOS CURSO DE GESTÃO DE MARKETING DOCENTE: CARLA OLIVEIRA SILVA
  • 2. REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS CATEGÓRICAS  Vimos até agora que as variáveis independentes que são consideradas na regressão linear múltipla são sempre variáveis quantitativas. Mas não é possível usar variáveis categóricas nos modelos de regressão múltipla?  As variáveis categóricas (nominais ou ordinais) só podem ser utilizadas em regressão múltipla depois de convertidas em variáveis dummy (fictícias), que são variáveis dicotómicas 0/1.
  • 3. REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS CATEGÓRICAS: VARIÁVEIS DUMMY • Considere o ficheiro ‘Jornalistas TV’. A variável ‘Género’ (0 para homem e 1 para mulher) é uma variável dummy, logo pode ser incluída diretamente no modelo • A equação da reta de regressão é dada por: 𝑦 = 469,535 + 62,916 𝑒𝑥𝑝𝑒𝑟𝑖ê𝑛𝑐𝑖𝑎 + 84,459𝑔é𝑛𝑒𝑟𝑜 Os resultados revelam que as mulheres (género=1) recebem mensalmente mais 84,459 € do que os homens.
  • 4. CRIAÇÃO DE VARIÁVEIS DUMMY Quando pretendemos incluir num modelo de regressão múltipla uma variável categórica que não está codificada como 0/1, é necessário criar uma variável dummy. Um exemplo poderá ser a criação de uma variável dummy para a tipologia, no ficheiro “casas”. Distinguir a tipologia numa regressão múltipla com o ficheiro casas Transform Create dummy variable
  • 5. CRIAÇÃO DE VARIÁVEIS DUMMY Na base de dados são criadas variáveis 0/1 e no output é possível é possível identificar a variável criada e a tipologia que esta representa.
  • 6. REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS CATEGÓRICAS: VARIÁVEIS DUMMY Analisar Regressão Linear Considere o ficheiro casas: pretende-se criar um modelo explicativo do preço anunciado das casas. Vamos por exemplo considerar a área útil e as dummies resultantes da tipologia.
  • 7. REGRESSÃO LINEAR MÚLTIPLA COM VARIÁVEIS CATEGÓRICAS: VARIÁVEIS DUMMY Considere o modelo 2: a equação para cada uma das tipologias é: YT2(pr anun) =183617,74 – 12428,724 + 1227,742 x (área útil)=171 189,016 + 1227,742 x YT3(pr anun) =183617,74 + 1227,742 x (área útil) YT4(pr anun) =183617,74 + 30266,835 + 1227,742 x (área útil) = 213 884,575 + 1227,742 x