Thursday 24 August 2017

Confusão E Interação Na Stata Forex


AVISO: O grupo de consultoria estatística IDRE estará migrando o site para o WordPress CMS em fevereiro para facilitar a manutenção e criação de novos conteúdos. Algumas de nossas páginas antigas serão removidas ou arquivadas de modo que elas não serão mais mantidas. Vamos tentar manter os redirecionamentos para que os URLs antigos continuem a funcionar da melhor maneira possível. Bem-vindo ao Instituto de Pesquisa e Educação Digital Ajudar o Grupo de Consultoria Estatística, dando um presente Regressão com Stata Capítulo 6: Mais sobre interações de variáveis ​​categóricas Versão preliminar Esta é uma versão preliminar deste capítulo. Comentários e sugestões para melhorar este rascunho são bem-vindos. Esquema do capítulo 6.1. Análise com duas variáveis ​​categóricas 6.2. Efeitos simples 6.2.1 Analisando efeitos simples usando xi3 e regredindo 6.2.2 Codificação de efeitos simples 6.3. Comparações simples 6.3.1 Analisando comparações simples usando xi3 e regredindo 6.3.2 Codificação de comparações simples 6.4. Interação parcial 6.4.1 Analisando interações parciais usando xi3 e regredindo 6.4.2 Codificação de interações parciais 6.5. Interação contrastada 6.5.1 Análise de contrastes de interação usando xi3 e regressão 6.5.2 Codificação de contrastes de interação 6.6. Meios ajustados de computação 6.6.1 Meios ajustados de computação via anova 6.6.1 Meios ajustados de computação através de regressão 6.7. Mais detalhes sobre o significado dos coeficientes 6.8. Efeitos simples através de codificação falsa versus codificação de efeito 6.8.1 Exemplo 1. Efeitos simples de ano em níveis de mealcat 6.8.2 Exemplo 2. Efeitos simples de mealcat em níveis de ano. Nota: Esta página faz uso dos programas xi3 e postgr3 que Não são mais mantidos e foram removidos dos nossos arquivos. As referências a xi3 e postgr3 serão deixadas nesta página porque ilustram princípios específicos de codificação de variáveis ​​categóricas. Para este capítulo, usaremos o arquivo de dados elemapi2 que usamos nos capítulos anteriores. Vamos nos concentrar nas variáveis ​​mealcat. E collcat como eles se relacionam com a variável de resultado api00 (desempenho na api no ano 2000). A variável mealcat é as refeições variáveis ​​divididas em três categorias, e a variável colabora é a variável somecol dividida em 3 categorias. Poderíamos pensar em mealcat como sendo o número de alunos que recebem refeições gratuitas e quebrados em baixo. Médio e alto. O algoritmo variável pode ser considerado como o número de pais com alguma educação universitária, e podemos pensar que está sendo dividido em baixo. Médio e alto. Para a nossa análise, pensamos que tanto o mealcat quanto o collcat podem estar relacionados a api00. Mas também é possível que o impacto do mealcat possa depender do nível do collcat. Em outras palavras, pensamos que pode haver uma interação dessas duas variáveis ​​categóricas. Neste capítulo, analisaremos como essas duas variáveis ​​categóricas estão relacionadas ao desempenho da api na escola, e também analisaremos a interação dessas duas variáveis ​​categóricas. Veremos que há uma interação dessas variáveis ​​categóricas, e se concentrará em diferentes maneiras de explorar ainda mais a interação. Em primeiro lugar, usaremos o arquivo de dados elemapi2. Vamos modificar o rótulo do mealcat para ver mais claramente alguns dos pontos que estaremos demonstrando mais adiante neste capítulo. 6.1. Análise com 2 variáveis ​​categóricas Uma maneira tradicional de analisar isso seria a realização de uma análise de variância fatorial 3 por 3 usando o comando anova, conforme mostrado abaixo. Os resultados mostram um efeito principal de collcat (F4.5, p-0.0117), um efeito principal de mealcat (F509.04, p0.0000) e uma interação de collcat por mealcat. (F6.63, p0.0000). Podemos usar o comando de ajuste para mostrar os meios ajustados quebrados por collcat e mealcat. Podemos mostrar um gráfico dos meios ajustados, conforme mostrado abaixo. Usamos o comando separado para fazer três variáveis ​​correspondentes aos três níveis de collcat (ou seja, yhat1 corresponde ao valor previsto quando o colate é baixo). Podemos então mostrar o gráfico com os três níveis de collcat representados como três linhas separadas. Agora, deixamos cair as variáveis ​​yhat yhat1 yhat2 yhat3 caso desejemos usar essas variáveis ​​mais tarde. Nós podemos fazer essas mesmas análises usando o comando regression. Abaixo, usamos o comando regress com xi3 para ver o efeito do collcat. Mealcat e a interação dessas duas variáveis. Utilizamos o comando de teste para testar os dois termos associados ao collcat para obter o efeito principal do collcat. Da mesma forma, usamos o comando de teste para obter o teste geral de mealcat. Finalmente, usamos o comando de teste para testar a interação do collcat pelo mealcat. Primeiro, note que os resultados dos comandos de teste correspondem aos do comando anova acima. Isso ocorre porque o codcat e o mealcat foram codificados usando codificação de efeito simples, um esquema de codificação onde os contrastes somam para 0. Nós indicamos que queríamos uma codificação de efeito simples usando g. collcat e g. mealcat no comando de regressão com xi3 (ver Capítulo 5 Para obter mais informações sobre esquemas de codificação disponíveis através do comando xi3). Se este tivesse sido codificado usando codificação falsa, e. I. collcat. Então os resultados dos comandos de teste para mealcat e somecat do comando regressão não corresponderiam aos resultados anova. Além da simples codificação de efeitos, poderíamos ter usado e. . H. . R. . uma. . B. . Ou o. E os resultados dos comandos de teste combinariam com o comando anova, embora o significado dos testes individuais fosse diferente. Este ponto será explorado com mais detalhes mais adiante neste capítulo. Podemos obter os meios ajustados usando o comando predizer para obter os valores previstos, chamando-os de pred e depois olhando a média de pred quebrada por collcat e mealcat. Podemos mostrar um gráfico dos meios celulares como mostrado abaixo. Usamos a mesma estratégia que fizemos ao fazer o gráfico acima. Agora, deixamos cair as variáveis ​​pred pred1 pred2 pred3 caso desejemos usar esses nomes de variáveis ​​mais tarde. Observe que poderíamos ter produzido o mesmo gráfico e tabela de valores previstos usando o comando postgr3. O gráfico da célula significa ilustra a interação entre o collcat e o mealcat. O gráfico mostra os três níveis de collcat como três linhas diferentes e os três níveis de mealcat como os três valores no eixo x do gráfico. Podemos ver que o efeito do collcat difere com base no nível de mealcat. Por exemplo, quando o mealcat é baixo, as escolas onde o collcat é 3 têm as pontuações mais baixas de api00, em comparação com as escolas que são médias ou altas em Foodcat. Onde as escolas com colabos de 3 têm as pontuações mais altas de api00. Vamos investigar esta interação ainda mais, observando os efeitos simples do colate em cada nível de Foodcat. 6.2. Efeitos simples Descobrimos que o efeito principal do colate foi significativo, mas, devido a uma interação, o efeito do colate depende do nível de comida. Podemos querer perguntar se o efeito do collcat é significativo em cada nível de mealcat. 6.2.1 Analisando efeitos simples usando xi3 e regredindo Para analisar os efeitos simples do colateado nos diferentes níveis de Foodcat. Usaremos o símbolo em vez de indicar que queremos que os termos de interação reflitam os efeitos simples do collcat em cada nível de mealcat. Usaremos a codificação Helmert para o collcat. Que será discutido mais adiante. Podemos obter o efeito simples do collcat quando o mealcat é baixo (ou seja, 1) através do comando de teste abaixo. Isso mostra que o efeito do collcat quando o mealcat é baixo é significante. Usamos o comando de descrição abaixo para ver o significado desses termos e ver que esses dois termos representam as duas comparações em collcat quando o mealcat é 1. Por exemplo, no termo Ico2Wme1. O 2 significa que esta é a segunda comparação em collcat e o 1 significa que é quando mealcat é 1. Podemos testar o efeito simples do collcat quando o mealcat é 2 através do comando de teste abaixo. Isso mostra que o collcat é significativo quando o mealcat é 2. Também podemos testar o efeito simples do collcat quando o mealcat é 3 através do comando de teste abaixo. Isso mostra que o collcat é significativo quando o mealcat é 3, se usarmos um nível alfa de 0,05. Devemos notar que, uma vez que estamos fazendo uma série de testes adicionais, você pode querer considerar o uso de correções post hoc, como uma correção de bonferoni para evitar erros de Tipo I. Em resumo, os três efeitos simples do collcat em cada nível de Foodcat foram significativos. No entanto, o efeito do collcat quando o Foodcat foi 3 pode não ser significativo se usássemos um critério post hoc para avaliar sua significância. 6.2.2 Codificação de efeitos simples Enquanto xi3 cria a codificação para você, é útil ver a codificação que ele cria para produzir esses efeitos simples. A codificação para o mealcat usou codificação simples, e sua codificação é exatamente como vimos no capítulo 5. Abaixo, usamos o comando tablist para mostrar a codificação do mealcat. Você pode baixar tablist de dentro do Stata digitando findit tablist (veja Como eu usei o comando findit para procurar programas e obter ajuda adicional para obter mais informações sobre o uso do findit). Nós vemos que a codificação do mealcat é exatamente como seria de esperar do capítulo 5. Solicitamos a codificação do Helmert para o Collcat. E podemos observar a codificação do collcat para ver que os termos Icollcat1 Icollcat2 são realmente codificados usando codificação Helmert. Devemos notar que esses termos não são usados ​​na análise, mas são usados ​​pelo xi3 para criar os efeitos simples mostrados na próxima seção. Agora que vimos o helmert codificando para o collcat. Podemos ver como isso é usado para criar os efeitos simples do collcat em cada nível de mealcat. Primeiro, olhamos para as duas comparações de collcat no mealcat de 1. Note que a codificação é a mesma que vimos acima, mas somente quando o mealcat é 1, caso contrário, essas variáveis ​​são codificadas 0. Da mesma forma, observamos os termos que formam Os efeitos do collcat quando o mealcat é 2, e vemos que as variáveis ​​são codificadas da mesma forma quando o mealcat é 2, e de outra forma. Finalmente, vemos o mesmo padrão para os termos que formam o efeito do collcat quando o Foodcat é 3. Isso ilustra como o xi3 codifica as variáveis ​​para permitir a análise de efeitos simples. Se você quisesse, você poderia criar variáveis ​​manualmente de acordo com esta estratégia para realizar uma análise de efeitos simples. 3. Comparações simples Nas análises acima, analisamos o efeito simples do collcat em cada nível de mealcat. Por exemplo, analisamos o efeito geral do collcat quando a Foodcat foi 1. Este é o efeito simples do collcat no mealcat 1. Como o collcat tem mais de dois níveis, talvez desejemos fazer outras comparações entre os três níveis de colabora dentro do mealcat 1. Comparações simples nos permitem fazer essas comparações. 6.3.1 Analisando Comparações Simples Usando xi3 e regredindo Nas análises acima, utilizamos a codificação Helmer para o colate. Nós escolhemos essa codificação para que possamos comparar o grupo 1 com os grupos 2 e 3 e, em seguida, comparar os grupos 2 e 3. Por exemplo, se quisermos comparar o collcat 1 versus 2 e 3, gostaríamos de analisar o efeito Ico1Wme1. E se queremos comparar grupos de colabos 2 e 3 quando o mealcat tiver 1, então veremos o efeito Ico2Wme1. Como xi3 cria rótulos para cada termo que ele cria, podemos usar o comando de descrição para verificar se estamos usando os termos corretos. Na verdade, vemos que esses termos são como esperávamos. Podemos usar o comando de regressão para ver os efeitos para esses termos. Vemos que o collcat 1 não é significativamente diferente de 2 e 3 no mealcat 1 (t.96, p.337), mas o collcat 2 é significativamente diferente do collcat 3 no mealcat 1 (t3.10, p0.002). 6.3.2 Codificação de comparações simples Podemos ver que a codificação de comparações simples é a mesma que a codificação de efeitos simples. Por exemplo, podemos ver que a codificação de Icollcat1 e Icollcat2 é codificada usando codificação Helmert. Então, o termo termo Ico1Wme1 representa a comparação de 1 de collcat versus colate 2 e 3 quando mealcat é 1. Portanto, a codificação é a mesma que a codificação para Icollcat1 quando mealcat é 1 e 0 caso contrário, veja abaixo. 6.4. Interação parcial Uma interação parcial permite que você aplique contrastes a um dos efeitos em um termo de interação. Por exemplo, podemos desenhar a interação do collcat pelo mealcat como este abaixo. Estes são chamados de interações parciais porque os coeficientes de contraste são aplicados a um dos termos envolvidos na interação. 6.4.1 Analisar interações parciais usando xi3 e regredir Como mostrado acima, desejamos comparar os grupos 1 versus 2 e 3 no colabro. E depois compare os grupos 2 e 3 no collcat. Isso implica a codificação do Helmert no collcat. como mostrado abaixo. A codificação para mealcat é escolhida como codificação de diferença direta (para fins de análises posteriores), mas poderia ter sido qualquer forma de codificação de efeito. Vamos ver todos os termos criados pelo comando xi3 usando o comando de descrição. A interação parcial de colate comparando grupos 1 versus 2 e 3 por mealcat é composta pelos termos de interação Ico1Xme1 e Ico1Xme2. Porque estes são os termos da interação que comparam os grupos 1 versus 2 e 3 no collcat. Abaixo, usamos o comando de teste para testar essa interação parcial. Achamos que essa interação é significativa. Da mesma forma, para comparar grupos 2 e 3 em collcat por mealcat. Nós testamos os dois termos da interação que envolvem a comparação dos grupos 2 e 3 no collcat. Achamos que essa comparação também é significativa. 6.4.2 Codificação de interações parciais Os termos Ico1Xme1 e Ico1Xme2 são apenas o produto de seus respectivos efeitos principais. A codificação para o mealcat é realmente irrelevante, desde que seja utilizada alguma forma de codificação que venha a 0. Abaixo você pode ver que Ico1Xme1 é apenas Icollcat1 Imealcat1. E você pode ver que Ico1Xme2 é apenas Icollcat1 Imealcat2. 6.5. Interacções contrastantes Acima, vimos que uma interação parcial permite aplicar coeficientes de contraste a um dos termos em uma interação bidirecional. Um contraste de interação permite aplicar coeficientes de contraste a ambos os termos em uma interação bidirecional. Por exemplo, no que diz respeito ao collcat, dizemos que desejamos comparar os grupos 2 e 3, e em relação ao mealcat desejamos comparar os grupos 1 e 2. A tabela desta é a seguinte. Se olharmos para o gráfico dos valores previstos (repetidos abaixo) que construímos antes, ele compara as linhas tracejadas e pontilhadas (colate 2 versus 3) pelo mealcat 1 versus 2, e novamente por mealcat 2 versus 3. 6.5.1 Analisando Contrastes de interação usando xi3 e regressão. Porque gostaríamos de comparar os grupos 1 versus 2, e depois os grupos 2 versus 3 no mealcat. Isso implica codificação de diferença direta para mealcat (que comparará 1 versus 2, depois 2 versus 3). Para o collcat, desejamos comparar os grupos 2 e 3, então podemos usar a codificação Helmer para essa comparação como fizemos acima (já que isso irá comparar 1 versus 2 e 3, depois 2 versus 3). Se não tivermos certeza do termo que queremos usar, podemos usar o comando de descrição para mostrar os rótulos para os termos de interação. A primeira comparação de interação de interesse é testada por Ico12Xme1. E este termo é significativo. Como esperamos, as linhas vermelha e verde não são paralelas quando comparamos o mealcat 1 e 2. A segunda comparação de interação de interesse é testada pelo Ico2Xme2. E este termo não é significativo. Olhando para o gráfico, podemos ver que as linhas vermelha e verde são principalmente paralelas entre o mealcat 2 e o 3. 6.5.2 Codificação dos contrastes de interação O termo Ico2Xme1 é apenas o produto dos respectivos efeitos principais, conforme mostrado abaixo. 6.6 Computação ajustada significa 6.6.1 Computador ajustado significa através de anova Primeiro, mostramos como você pode calcular os meios ajustados usando o comando anova. Usamos o mesmo modelo que usamos, incluindo o mealcat. Colabora e a interação dessas duas variáveis. Depois de executar a anova, podemos usar o comando de ajuste para obter os meios ajustados quebrados por collcat e mealcat. Estes valores ajustados calculam o significado que seria esperado se cada escola da amostra estivesse na média para a variável emer. Observe que é possível calcular os meios ajustados com emer em outros valores além da média, por exemplo, se tivéssemos colocado emer50, teria calculado significa ajustar cada escola como se tivesse uma média de 50. 6.6.2 Média de ajuste ajustada por regressão Agora, ilustramos como obter os mesmos meios ajustados se você fosse para a análise através do comando de regressão. Primeiro, realizamos a análise de regressão que é equivalente ao comando anova acima. Para criar os meios ajustados, desejamos assumir que todas as escolas estão na média na variável emer. Fazemos isso atribuindo a média de emer à variável emer. Mas primeiro fazendo uma cópia de emer como temer para que não destruamos o conteúdo dessa variável. Agora, nós criamos você como o valor previsto. Como o valor de emer está configurado para a média de emer. Este será o valor previsto, assumindo que todas as escolas estão na média para emer. Agora, podemos observar a média de Yhat quebrada por Collcat e Foodcat. Que você pode ver corresponde aos meios ajustados que encontramos com o comando de ajuste seguindo o comando anova acima. Em seguida, deixamos cair a variável emer e yhat, já que não precisamos mais dessas variáveis, e renomear temer de volta para emer para que a variável emer volte ao modo como era antes desse processo. 6.63 Computação Meios ajustados via post3 O comando postgr pode ser usado para simplificar o processo de computação de meios ajustados (isto é, valores previstos quando se mantêm outras variáveis ​​constantes). Vamos assumir que você executou a mesma regressão como mostrado acima Você pode então mostrar o gráfico dos meios ajustados e da tabela de meios ajustados usando o postgr3 como mostrado abaixo. Abaixo, mostramos apenas os meios adequados, e você pode ver que eles correspondem aos calculados acima. Devemos sublinhar que é importante usar o comando xi3 (em vez de xi) antes de usar o postgr3 porque, em seguida, o postgr3 sabe quais as variáveis ​​devem ser mantidas constantes (neste exemplo emer) e quais variáveis ​​não devem ser mantidas constantes (neste exemplo, Imealcat2 Através do Ico3Xme3). 6.7 Mais detalhes sobre o significado dos coeficientes Até agora, discutimos uma variedade de técnicas que você pode usar para ajudar a interpretar as interações das variáveis ​​categóricas na regressão, mas não nos explicamos o significado dos coeficientes nessas análises. Vamos considerar isso ainda mais. Considere a análise abaixo usando collcat e mealcat. Usando contrastes simples em ambas as variáveis. Podemos produzir os meios ajustados como mostrado abaixo. Estes serão úteis para interpretar o significado dos coeficientes. Nós deixamos cair a variável yhat, já que não precisamos mais, caso desejemos usar novamente esse nome de variável. Vamos considerar o significado do coeficiente para Icollcat2. A codificação para esta variável compara o grupo 2 versus o grupo 1, portanto, esse coeficiente corresponde à média (collcat2) - média (collcat1). Note-se que estes são os meios não ponderados, então calculamos a média para o collcat2 como a média das três células correspondentes ao collcat2. Isto é (825.651636.605508.833) 3. Se compararmos o resultado abaixo com o coeficiente para Icollcat2, vemos que eles são os mesmos. Do mesmo modo, o coeficiente para Icollcat3 é significante (collcat3) - significa (collcat1), calculado abaixo. O valor abaixo corresponde ao coeficiente de Icollcat3. Da mesma forma, o coeficiente para Imealcat2 funciona como significante (mealcat2) - significa (mealcat1), veja abaixo. E o coeficiente para Imealcat3 é médio (mealcat3) - significa (mealcat1), veja abaixo. Para obter o significado dos coeficientes para os termos de interação, precisamos multiplicar a codificação de contraste dos principais efeitos que criaram os termos de interação. Por exemplo, o termo Ico2Xme2 é o produto de Icollcat2 e Imealcat2. Podemos formar uma tabela 3 por 3 mostrando a codificação para Icollcat2 à esquerda e Imealcat2 ao longo do topo e, em seguida, multiplique estes termos juntos e coloque os produtos nas células da tabela, veja abaixo. Podemos então multiplicar esses termos no Células por meio das células e obtemos o valor do coeficiente para Ico2Xme2. Em outras palavras, vemos que esse coeficiente corresponde aos meios das células (1,2) e (2,1) menos células (1,1) e (2,2). Podemos passar pelo mesmo processo para verificar o significado dos coeficientes para os outros três termos de interação. Verificamos que Ico2Xme3 é 6.177. Também verificamos se Ico3Xme2 é 101.051. E verificamos que Ico3Xme3 é 82.577. 6.8 Efeitos simples através de codificação falsa versus codificação de efeito Você pode se perguntar por que fomos ao esforço de usar o xi3 para criar e testar esses efeitos, em vez de apenas usar codificações falsas, como se obtivéssemos com o comando xi. Vamos comparar como obter efeitos simples usando o comando xi3 através da codificação de efeito para como obtermos efeitos simples usando xi com codificação falsa. Esperamos mostrar que é muito mais fácil usar codificação de efeito via xi3 e que a interpretação dos coeficientes é muito mais intuitiva. 6.8.1 Exemplo 1. Efeitos simples de andrnd em níveis de mealcat Vamos usar um exemplo do Capítulo 3 (seção 3.5). Nesse exemplo, analisamos uma análise usando mealcat e ano e a interação dessas duas variáveis. Primeiro, nós analisamos como fazer uma análise de efeitos simples, analisando os efeitos simples de Yrrnd em cada nível de Foodcat usando o comando xi3 com efeito de codificação. Para que nossos resultados correspondam aos do Capítulo 3, faremos do grupo 3 da mealcat a categoria de referência. Agora, podemos obter o efeito simples de Yrrnd no Foodcat 1, inspecionando o coeficiente para Iyr1Wme1. O efeito simples de andrnd no mealcat 2, inspecionando o coeficiente para Iyr1Wme2 e o efeito simples de yrrnd no mealcat 3, inspecionando o coeficiente para Iyr1Wme3. Agora, execute a mesma análise usando xi com codificação falsa. Novamente, nós faremos explicitamente que o terceiro grupo para a Foodcat seja a categoria omitida. Para formar uma prova de efeitos principais simples, precisamos fazer uma tabela como a que se mostra abaixo, que relaciona os meios das células com os coeficientes na regressão. Consulte o Capítulo 3, seção 3.5 para obter informações sobre como essa tabela foi construída. Comece por analisar como obter o efeito simples de Yrrnd quando o Foodcat é 3. Olhando para a tabela acima, podemos ver que gostaríamos de comparar contras contra Byrrnd. Nós podemos fazer isso com o comando lincom como mostrado abaixo. Nós vemos que os contras caem, caindo apenas por ano. Em vez disso, podemos usar o comando de teste para testar se o coeficiente para yrrnd é 0. Observe que este resultado corresponde ao resultado que encontramos com o comando xi3 também testando o efeito simples de yrrnd quando o feedcat é 3. Observe que o coeficiente para Yrrnd Corresponde ao teste do efeito de yrrnd quando todas as outras variáveis ​​são definidas para 0 (a categoria de referência), ou seja, quando o mealcat é definido como a categoria de referência. Você pode ser tentado a interpretar o coeficiente para o ano como a diferença geral entre as escolas de todo o ano e as escolas sem fins de ano, mas neste exemplo vemos que ele realmente corresponde ao efeito simples de Yrrnd. Ao usar codificações falsas, as pessoas costumam interpretar mal os efeitos da ordem inferior para se referir a efeitos gerais em vez de efeitos simples. Agora, vamos olhar o efeito simples de yrrnd quando mealcat 1. Olhando para a tabela acima vemos que isso envolve a comparação dos coeficientes para yrrnd 1 versus yrrnd 0 quando mealcat 1, isto é, comparando contras e Imealcat1 ImeaXyrrn1 contra contras Imealcat1. Removendo os termos que abandonam, podemos fazer o comando de teste abaixo. Podemos também obter o efeito de yrrnd quando mealcat é 2, como mostrado abaixo. Esses exemplos ilustram que é mais complicado formar efeitos simples ao usar codificação falsa, e também que a interpretação de efeitos de ordem inferior ao usar codificação falsa pode não ter o significado que você esperaria. 6.8.2 Exemplo 2. Efeitos simples de Foodcat aos níveis de ano. O exemplo 1 analisou efeitos simples para o ano. Uma variável com apenas dois níveis. Neste exemplo, consideramos os efeitos simples do mealcat em cada nível de ano. Como a Foodcat tem mais de dois níveis, podemos ver o que é necessário para fazer testes de efeitos simples para variáveis ​​com mais de dois níveis. Primeiro, mostre como obter esses efeitos simples usando o comando xi3 usando a codificação de efeito. Podemos obter o efeito simples de mealcat no ano 0, assim como fizemos anteriormente neste capítulo. E também obtemos o efeito simples de mealcat no primeiro ano, como mostrado abaixo. Agora podemos testar os efeitos simples do mealcat em cada nível de ano através de codificação falsa. O efeito simples de mealcat quando yrnd é 0 requer duas declarações de teste, uma vez que é um teste de 2 graus de liberdade. Podemos fazer isso testando média (mealcat1) média (mealcat2) e também meio de teste (mealcat2) (mealcat3). Podemos observar a tabela acima e ver que significam (mealcat1) significa (mealcat2) é Imealcat1 - Imealcat2 (depois de desvios) e significa (mealcat2) significa (mealcat3) é Imealcat2 depois que os cons deixa cair. Então, podemos realizar este teste usando os dois comandos de teste abaixo. Note-se que os efeitos Imealcat1 e Imealcat2 não correspondem aos efeitos globais da variável mealcat, mas são os efeitos simples, quando andrnd está definido como 0, o nível de referência. Mais uma vez, vemos que os termos que podemos ser tentados a chamar de efeitos principais e pensamos que os efeitos globais são realmente efeitos simples quando a codificação falsa é usada. O segundo comando de teste usa a opção accum para acumular os testes para obter o teste de 2 graus de liberdade que corresponde ao efeito simples de mealcat quando yrnd é 0. Da mesma forma, podemos observar a tabela acima para formar as comparações necessárias para obter o Efeitos simples de mealcat quando yrrnd é 1. Usando este exemplo, esperamos ilustrar que ao executar efeitos simples para uma variável com mais de dois níveis pode ser bastante complicado e requer a construção de vários comandos de teste, um comando de teste para cada grau de liberdade no Efeito simples. Como você pode ver, a construção desses termos pode ser muito complicada e possivelmente propensa a erros. Sem um método para resultados de verificação dupla, é muito possível cometer um erro ao construir termos e formar uma comparação errada. Em comparação, usando codificação de efeito com xi3. Formar comparações pode ser muito mais fácil e a interpretação dos efeitos da ordem inferior é muito mais intuitiva. Os efeitos da ordem inferior correspondem aos efeitos globais da variável, por exemplo, o efeito de yrrnd. Ao usar a codificação de efeito, corresponde à média global não ponderada para as escolas do ano todo em comparação com as escolas não-redondas. O conteúdo deste site não deve ser interpretado como um endosso de qualquer site, livro ou produto de software específico da Universidade da Califórnia. Wayne W. LaMorte, MD, PhD, MPH, Professor de Epidemiologia Lisa Sullivan, PhD, Professor Da Biostatistics Boston University School of Publich Health NOTA: Este módulo é usado tanto para BS704 como para EP713. Introdução Confundir é uma distorção da associação entre uma exposição e um resultado que ocorre quando os grupos de estudo diferem em relação a outros fatores que influenciam o resultado. Ao contrário do viés de seleção e informação, que pode ser introduzido pelo investigador ou pelos sujeitos, a confusão é um tipo de viés que pode ser ajustado para a análise, desde que os pesquisadores tenham informações sobre o status das pessoas estudadas em relação a possíveis confusões Fatores. A modificação do efeito é distinta da confusão ocorre quando a magnitude do efeito da exposição primária em um resultado (ou seja, a associação) difere dependendo do nível de uma terceira variável. Objetivos de Aprendizagem Depois de completar este módulo, o aluno será capaz de: Explicar as três principais propriedades de uma confusão Definir e identificar confundindo Identificar três maneiras de controlar a confusão na fase de projeto de um estudo e identificar os pontos fortes e fracos de cada abordagem Descrever Formas de controlar a confusão na fase de análise de um estudo. Explicar e calcular as medidas de associação em bruto e estrato. Compara as medidas de associação brutas e ajustadas para identificar se a confusão está presente e caracteriza a direção e a magnitude da confusão. Descreva confusão residual e identifique possíveis Fontes Definir e fornecer um exemplo de modificação de efeito O que é Confundir confundindo é uma distorção (imprecisão) na medida estimada de associação que ocorre quando a exposição primária de interesse é misturada com algum outro fator que está associado ao resultado. No diagrama abaixo, o principal objetivo é verificar a força da associação entre inatividade física e doença cardíaca. A idade é um fator de confusão porque está associada à exposição (o que significa que as pessoas mais velhas são mais propensas a estarem inativas) e também está associada ao resultado (porque as pessoas idosas estão em maior risco de desenvolver doenças cardíacas). Para que a confusão ocorra, o fator estranho deve ser associado à exposição primária de interesse e ao resultado da doença de interesse. Por exemplo, os indivíduos que são fisicamente ativos podem beber mais líquidos (por exemplo, bebidas aquáticas e esportivas) do que pessoas inativas, mas beber mais fluido não tem efeito sobre o risco de doença cardíaca, portanto, a ingestão de líquidos não é um fator de confusão aqui. Ou, se a distribuição etária for semelhante nos grupos de exposição a serem comparados, a idade não causará confusão. Refinando nosso entendimento de Rothman confundido e outros usam um estudo de Stark e Mantel para ilustrar as principais características da confusão. Esses autores investigaram a associação entre o parto e o risco de síndrome de Down. O primeiro gráfico à direita mostra uma tendência clara em relação ao aumento da prevalência da síndrome de Down com o aumento da ordem de nascimento ou uma associação entre o aumento da ordem de nascimento eo risco de síndrome de Down. Um filho de 5 anos parece ter aproximadamente um aumento de 4 vezes no risco de nascer com síndrome de Down. Resultados como este também nos convidam a pensar sobre os mecanismos pelos quais isso ocorreu. Por que a ordem de nascimento pode causar maior risco de síndrome de Down Tenha em mente que essa análise não considera outros fatores de quotrisk além da ordem de nascimento. No entanto, considere também que a ordem em que as crianças das mulheres nascem também está ligada à sua idade no momento do nascimento do filho. Quando Stark e Mantel examinaram a relação entre a idade materna ao nascer e o risco da criança com síndrome de Down, eles observaram a relação descrita no gráfico de barras abaixo. Isso mostra uma relação ainda mais marcante entre a idade materna ao nascer e o risco de nascer com a síndrome de Down. Obviamente, as mulheres que dão a luz ao seu quinto filho são, em média, mais velhas que as mulheres que dão à luz seu primeiro filho. Em outras palavras, a ordem de nascimento das crianças é confundida com a idade materna quando uma criança nasce. A correlação entre a idade materna e a prevalência da síndrome de Down é muito mais forte do que a correlação com a ordem de nascimento, e uma mulher com seu 5º filho é claramente maior do que quando ela deu à luz seus filhos anteriores. Diante disso, a relação entre a ordem do parto e a prevalência da síndrome de Down é confundida por idade. Em outras palavras, a associação entre a ordem do parto e a síndrome de Down é exagerada pelo efeito confuso da idade materna. But is the converse also true Is the effect of maternal age confounded by birth order It is possible, but only if birth order really has some independent effect on the likelihood of Down syndrome, i. e. an effect independent of the fact that birth order is linked to maternal age. Rothman points out that a good way to sort this out is to look at both effects simultaneously, as in the graph below. In a sense this graph shows the relationships by stratifying the prevalence of Down syndrome by both birth order and maternal age. If one focuses on how prevalence changes within any particular maternal age group looking from side to side, it is clear that increasing birth order does not correlate with the prevalence of Down syndrome. In other words, if one quotcontrols for maternal age, quot there is no evidence that birth order has any impact. On the other hand, if one now examines changes in prevalence within each of the birth order groups by looking from front to back within a given birth order, there is clearly a marked increase in prevalence as maternal age increases within all five levels of birth order. In other words, even after taking birth order into account (i. e. controlling for birth order) the strong association with maternal age persists. Based on this analysis one can conclude that the association between birth order and Down syndrome was confounded by age. The different birth order groups had different age distributions, and maternal age is clearly associated with prevalence of Down syndrome. As a result, the apparent association between birth order and and Down syndrome that was seen in the first figure was completely due to the confounding effect of age. On the other hand, the association between maternal age and Down syndrome was NOT confounded by birth order, because birth order has no impact on the prevalence of Down syndrome, and the association between age and Down was not distorted by differences in birth order. Unraveling the Complexity of Health Problems Most health problems have many determinants (quotrisk factorsquot), so it is not surprising that there is a lot of potential for confounding. While this can represent a barrier to testing a particular hypothesis, it is also an opportunity to dissect the many determinants and to define their relative importance. In quotEpidemiology - An Introductionquot Ken Rothman says the following about this complexity: quotThe research process of learning about and controlling for confounding can be thought of as a walk through a maze toward a central goal. The path through the maze eventually permits the scientist to penetrate into levels that successively get closer to the goal: in the example of maternal age and Down syndrome the apparent relations between Down syndrome and birth order can be explained entirely by the effect of mothers age, but that effect in turn will ultimately be explained by other factors that have not yet been identified. As the layers of confounding are left behind, we gradually approach a deeper causal understanding of the underlying biology. Unlike a maze, however, this journey toward biologic understanding does not have a clear endpoint, in the sense that there is always room to understand the biology in a deeper way. quot Conditions Necessary for Confounding There are three conditions that must be present for confounding to occur: The confounding factor must be associated with both the risk factor of interest and the outcome. The confounding factor must be distributed unequally among the groups being compared. A confounder cannot be an intermediary step in the causal pathway from the exposure of interest to the outcome of interest. For example, it is known that modest alcohol consumption is associated with a decreased risk of coronary heart disease, and it is believed that one of the mechanisms by which alcohol causes a reduced risk is that alcohol raises blood levels of HDL, the so called quotgood cholesterol. quot Higher levels of HDL are known to be associated with a reduced risk of heart disease. Consequently it is believed that modest alcohol consumption raises HDL levels, and this, in turn, reduces coronary heart disease. In a situation like this HDL levels are not confounder of the association between alcohol and heart disease, because it is part of the mechanism by which alcohol produces this beneficial effect. If increased HDL is a consequence of alcohol consumption and part of the mechanism by which it lowers the risk of heart disease, then it is not a confounder.. Not surprisingly, since most diseases have multiple contributing causes (risk factors), there are many possible confounders. A confounder can be another risk factor for the disease. For example, in the hypothetical cohort study testing the association between exercise and heart disease, age is a confounder because it is a risk factor for heart disease. Similarly a confounder can also be a preventive factor for the disease. If those people who exercised regularly were more likely to take aspirin, and aspirin reduces the risk of heart disease, then aspirin use would be a confounding factor that would tend to exaggerate the benefit of exercise. A confounder can also be a surrogate or a marker for some other cause of disease. For example, socioeconomic status may be a confounder in this example because lower socioeconomic status is a marker for a complex set of poorly understood factors that seem to carry a higher risk of heart disease. As a result, there may be many possible confounding factors that could influence an association. For example, in looking at the association between exercise and heart disease, other possible confounders might include age, diet, smoking status and a variety of other risk factors that might be unevenly distributed between the groups being compared. Aside from their physical inactivity, sedentary subjects may be more likely to smoke, to have high blood pressure and diabetes, and to consume diets with a higher fat content all of these factors would tend to increase the risk of coronary heart disease. On the other hand, subjects who go to a gym regularly (active) may be more likely to be males and perhaps more likely to have a family history of heart disease, i. e. factors that might increase the risk of active subjects. Consequently, there may be many confounders that can distort the estimate of association in one direction or another. Identifying Confounding A simple, direct way to determine whether a given risk factor caused confounding is to compare the estimated measure of association before and after adjusting for confounding. In other words, compute the measure of association both before and after adjusting for a potential confounding factor. If the difference between the two measures of association is 10 or more, then confounding was present. If it is less than 10, then there was little, if any, confounding. How to do this will be addressed in greater detail below. Other investigators will determine whether a potential confounding variable is associated with the exposure of interest and whether it is associated with the outcome of interest. If there is a clinically meaningful relationship between an the variable and the risk factor and between the variable and the outcome (regardless of whether that relationship reaches statistical significance), the variable is regarded as a confounder. Still other investigators perform formal tests of hypothesis to assess whether the variable is associated with the exposure of interest and with the outcome. Effects of Confounding May account for all or part of an apparent association. May cause an overestimate of the true association (positive confounding) or an underestimate of the association (negative confounding). The magnitude confounding can be quantified by computing the percentage difference between the crude and adjusted measures of effect. There are two slightly different methods that investigators use to compute this, as illustrated below. Percent difference is calculated by calculating the difference between the starting value and ending value and then dividing this by the starting value. Many investigators consider the crude measure of association to be the quotstarting valuequot. Method Favored by Biostatisticians Other investigators consider the adjusted measure of association to be the starting value, because it is less confounded than the crude measure of association. Method Favored by Epidemiologists While the two methods above differ slightly, they generally produce similar results and provide a reasonable way of assessing the magnitude of confounding. Note also that confounding can be negative or positive in value. Residual Confounding, Confounding by Indication, amp Reverse Causality Residual Confounding Residual confounding is the distortion that remains after controlling for confounding in the design andor analysis of a study. There are three causes of residual confounding: There were additional confounding factors that were not considered, or there was no attempt to adjust for them, because data on these factors was not collected. Control of confounding was not tight enough. For example, a study of the association between physical activity and age might control for confounding by age by a) restricting the study population to subject between the ages of 30-80 or b) matching subjects by age within 20 year categories. In either event there might be persistent differences in age among the groups being compared. Residual differences in confounding might also occur in a randomized clinical trial if the sample size was small. In a stratified analysis or in a regression analysis there could be residual confounding because data on confounding variable was not precise enough, e. g. age was simply classified as quotyoungquot or quotoldquot. There were many errors in the classification of subjects with respect to confounding variables. Confounding by Indication Confounding by indication is a special type of confounding that can occur in observational (non-experimental) pharmaco-epidemiologic studies of the effects and side effects of drugs. This type of confounding arises from the fact that individuals who are prescribed a medication or who take a given medication are inherently different from those who do not take the drug, because they are taking the drug for a reason. In medical terminology, such individuals have an quotindicationquot for use of the drug. Even if the study population consists of subjects with the same disease, e. g. osteoarthritis, they may differ in the severity of their disease and may therefore differ in the need for medication. Aschengrau and Seage give the example of studies of the association between antidepressant drug use and infertility. The use of antidepressant medications may appear to be associated with an increased risk of infertility. However, depression itself is a known risk factor for infertility. As a result, there would appear to be an association between antidepressants and infertility. One way of dealing with this is to study the association in subjects who are receiving different treatments for the same underlying disease condition. A variation on this might be dubbed quot confounding by contraindication. quot For example, in the case-control study by Perneger and Whelton examining the association between analgesic drug use and kidney failure the authors compared prior analgesic use between patients receiving kidney dialysis and population controls without known kidney disease. Suppose that patients on dialysis had been advised to avoid taking aspirin because of its effects on blood clotting they may have been advised to take acetaminophen (Tylenol) instead). If the group of dialysis cases included a number of people who had been on long-term dialysis, this would result in a decreased frequency of aspirin use and and increased use of Tylenol in the case group. As a result, an association with aspirin would be underestimated, while an association with Tylenol would be overestimated. Reverse Causality Reverse causality occurs when the probability of the outcome is causally related to the exposure being studied. For example, Child feeding recommendations of the World Health Organization include breastfeeding for two years or more, because of evidence that breast fed children have a reduced risk of infectious agents and are less likely to die. However, some studies have produced conflicting concerns. One possibility is that in communities with very poor resources the children who are at greatest risk and perhaps have the least access to other food sources are more likely to be breast fed for at least two years. A comparison of growth and development between these children and more advantaged children would likely find less progress in the breast fed group. (See quotAssociation of Breastfeeding and Stunting in Peruvian Toddlers: An Example of Reverse Causalityquot by Marquis GS, et al. International Journal of Epidemiology 1997 26: 3498211356. The case-control study by Perneger and Whelton may also have been affected by reverse causality. Diabetes is a leading cause of renal failure in the US, and chronic diabetes is associated with a number of other health problems such as cardiovascular diseases and infections that could result in a greater use of analgesics. If so, the dialysis cases whose renal failure resulted from diabetes might have taken more analgesics because of their diabetes. Nevertheless, it would appear that analgesic use was associated with an increased risk of renal failure rather than vice versa. Control of Confounding in Study Design Restriction One of the conditions necessary for confounding to occur is that the confounding factor must be distributed unequally among the groups being compared. Consequently, one of the st rategies employed for avoiding confounding is to restrict admission into the study to a group of subjects who have the same levels of the confounding factors. For example, in the hypothetical study looking at the association between physical activity and heart disease, suppose that age and gender were the only two confounders of concern. If so, confounding by these factors could have been avoided by making sure that all subjects were males between the ages of 40-50. This will ensure that the age distributions are similar in the groups being compared, so that confounding will be minimized. This approach to controlling confounding is simple and effective, but it has several limitations: It reduces the number of subjects who are eligible (may cause sample size problem). Residual confounding can occur if you dont restrict narrowly enough. For example, in the study on exercise and heart disease, the investigators might have restricted the study to men aged 40-65. However, the age-related risk of heart disease still varies widely within this range as do levels of physical activity. You cant evaluate the effects of factors that have been restricted for. For example, if the study is limited to men aged 45-50, you cant use this study to examine the effects of gender or age (because these factors dont vary within your sample). Restriction limits generalizability. For example, if you restrict the study to men, you may not be able to generalize the findings to women. Instead of restriction, one could also ensure that the study groups do not differ with respect to possible confounders such as age and gender by matching the two comparison groups. For example, for every active male between the ages of 40-50, we could find and enroll an inactiv e male between the ages of 40-50. In this way, the groups we are comparing can artificially be made similar with respect to these factors, so they cannot confound the relationship. This method actually requires the investigators to control confounding in both the design and analysis phases of the study, because the analysis of matched study groups differs from that of unmatched studies. Like restriction, this approach is straightforward, and it can be effective. However, it has the following disadvantages: It can be time-consuming and expensive. It limits sample size. You cant evaluate the effect of the factors you that you matched for. Nevertheless, matching is useful in the following circumstances: When one needs to control for complex, multifaceted variables (e. g. heredity, environmental factors) When doing a case-control study in which there are many possible controls, but a smaller number of cases (e. g. 4:1 matching in the study examining the association between DES and vaginal cancer) Randomization in Clinical Trials You previously studied randomization in the online module on Clinical Trials. Given the more detailed discussion in this current module of the conditions necessary for confounding to occur, it should be obvious why randomization is such a powerful method to control prevent confounding. If a large number of subjects are allocated to treatment groups by a random method that gives an equal chance of being in any treatment group, then it is likely that the groups will have similar distributions of age, gender, behaviors, and virtually all other known and as yet unknown possible confounding factors. Moreover, the investigators can get a sense of whether randomization has successfully created comparability among the groups by comparing their baseline characteristics. Control of Confounding in the Analysis - Stratified Analysis One way of identifying confounding is to examine the primary association of interest at different levels of a potential confounding factor. The side by side tables below examine the relationship between obesity and incident CVD in persons less than 50 years of age and in persons 50 years of age and older, separately. Table of Obesity and Incident Cardiovascular Disease by Age Group The stratum-specific risk ratios are as follows: Recall that the risk ratio for the total, combined sample was RR 1.79 this is sometimes referred to as the quotcrudequot measure of association, because it is not adjusted for potential confounding factors. The risk ratios for the age-stratified analysis are similar (RR 1.43 and 1.44, respectively), but less than the crude risk ratio. This indicates that there was confounding by age in the overall sample. We saw that obese subjects were more likely to be 50 and older, and we also saw that those over age 50 had a greater risk of CVD. As a result, the crude analysis overestimated the true association between obesity (per se) and CVD, because of the greater proportion of older subjects among the obese group. Several things are noteworthy in this example. First, if you compare the cumulative incidence in young versus old active subjects, you can see that older subjects had a higher risk of CVD than younger subjects this was true for both obese and non-obese subjects. Therefore, age and CVD (the outcome of interest) are associated. In addition, obesity was more common in older subjects, meaning that age and obesity were also associated. Finally, there is no reason to think that age is an intermediary variable in the causal chain between obesity and CVD. Therefore, these observations satisfy all three of the requirements for a confounder. Comparing the crude and stratum-specific measures of association is a very practical way to determine whether confounding is present and how bad it is. You calculate an overall crude (unadjusted) relative risk (or odds ratio) and compare it to the stratum-specific relative risks (or odds ratios). If the stratum-specific measures of association are similar to the crude measure of association, then there is no confounding by that factor, and you can just use the crude measure of association. However, if the stratified estimates of association differ from the unadjusted estimate by 10 or more, then there is evidence of confounding. The Cochran-Mantel-Haenszel Method In the example above we saw that the relationship between obesity and CVD was confounded by age. When the data was pooled, it appeared that the risk ratio for the association between obesity and CVD was 1.79. However, when we stratified the analysis into those age lt50 and those age 50, we saw that both groups had a risk ratio of about 1.43. The distortion was due to the fact that obese individuals tended to be older, and older age is a risk factor for CVD. Consequently, in the analysis using the combined data set, the obese group had the added burden of an additional risk factor. The Cochran-Mantel-Haenszel method is a technique that generates an estimate of an association between an exposure and an outcome after adjusting for or taking into account confounding. The method is used with a dichotomous outcome variable and a dichotomous risk factor. We stratify the data into two or more levels of the confounding factor (as we did in the example above). In essence, we create a series of two-by-two tables showing the association between the risk factor and outcome at two or more levels of the confounding factor, and we then compute a weighted average of the risk ratios or odds ratios across the strata (i. e. across subgroups or levels of the confounder). Data Layout for Cochran-Mantel-Haenszel Estimates Before computing a Cochran-Mantel-Haenszel Estimate, it is important to have a standard layout for the two by two tables in each stratum. We will use the general format depicted here: Using the notation in this table estimates for a risk ratio or an odds ratio would be computed as follows: Cochran-Mantel-Haenszel Equations To explore and adjust for confounding, we can use a stratified analysis in which we set up a series of two-by-two tables, one for each stratum (category) of the confounding variable. Having done that, we can compute a weighted average of the estimates of the risk ratios or odds ratios across the strata. The weighted average provides a measure of association that is adjusted for confounding. The weighted averages for risk ratios and odds ratios are computed as follows: Cochran-Mantel-Haenszel Estimate for a Risk Ratio Cochran-Mantel-Haenszel Estimate for an Odds Ratio Where a i . b i . c i . and d i are the numbers of participants in the cells of the two-by-two table in the i th stratum of the confounding variable, and n i represents the number of participants in the i th stratum. To illustrate the computations, we can use the previous example examining the association between obesity and CVD, which we stratified into two categories: those with age 824950 and those who were 880550 at baseline: Table of Obesity and Incident Cardiovascular Disease by Age Group From the stratified data we can also compute the Cochran-Mantel-Haenszel estimate for the risk ratio as follows: If we chose to, we could also use the same data set to compute a crude odds ratio (crude OR 1.93) and we could also compute stratum-specific odds ratios as follows: And, using the same data we could also compute the Cochran-Mantel-Haenszel estimate for the odds ratio as follows: The Cochran-Mantel-Haenszel method produces a single, summary measure of association which provides a weighted average of the risk ratio or odds ratio across the different strata of the confounding factor. Notice that the adjusted relative risk and adjusted odds ratio, 1.44 and 1.52, are not equal to the unadjusted or crude relative risk and odds ratio, 1.78 and 1.93. The adjustment for age produces estimates of the relative risk and odds ratio that are much closer to the stratum-specific estimates (the adjusted estimates are weighted averages of the stratum-specific estimates). Cochran-Mantel-Haenszel for Incidence Rates Note that there is also an Cochran-Mantel-Haenszel equation which can be used when dealing with incidence rates in prospective studies in which incidence rates are computed. The general format is depicted here: Using the notation in this table estimates for an incidence rate ratio would be computed as follows: Where for each stratum, a i number of exposed cases, cinumber of unexposed cases, PTei and PT0i are the person-time for exposed and unexposed groups respectively, and PT Ti is the total person-time in each stratum. More Than Two Sub-strata In the examples above we used just two levels or sub-strata or of the confounding variable, but one can use more than two sub-strata. This is particularly important when using stratification to control for confounding by a continuously distributed variable like age. In the example above looking at the relationship between obesity and CVD we stratified the analysis by age, looking at the relationship in subjects lt50 and those who were 50. However, subjects lt50 are likely to vary substantially with respect to BMI and rates of CVD the same is true for subjects of age 50. By stratifying into just two broad age groups, we would likely have a problem with residual confounding . To deal with this, we could stratify by age at 5 year intervals. Stratification to Control for Two or More Factors In looking at the relationship between exercise and heart disease we were also concerned about confounding by other factors, such as gender and the presence of a family history of heart disease. We could also stratify by these factors to see if they were confounders and to adjust for them. Limitations of Stratified Analysis A stratified analysis is easy to do and gives you a fairly good picture of whats going on. However, a major disadvantage to stratification is its inability to control simultaneously for multiple confounding variables. For example, you might decide to control for gender, 3 levels of smoking exposure, 4 levels of age, and 4 levels of BMI. This would require 96 separate strata to control for all of these variables simultaneously, and as you increase the number of strata, you keep whittling away at the number of people in each stratum, so sample size becomes a major problem, since many of the strata will contain few or no people. Summary of Control of Confounding It is possible to minimize confounding by utilizing certain strategies in the design of a study: Restriction Matching Randomization (in intervention studies only) There are also analytical techniques that provide a way of adjusting for confounding in the analysis, provided one has information on the status of the confounding factors in the study subjects. These techniques are: Stratification Multiple variable regression analysis Effect Measure Modification The term effect modification is applied to situations in which the magnitude of the effect of an exposure of interest differs depending on the level of a third variable. Reyes syndrome is a rare, but severe condition characterized by the sudden development of brain damage and liver dysfunction after a viral illness. The syndrome is most commonly seen in children between the ages of 4-14 who have been treated with aspirin while recovering from a viral illness, most commonly chickenpox or influenza. Fortunately, Reyes syndrome has become very uncommon since aspirin is no longer recommended for routine use in children. While Reyes syndrome can occur in adults, it is distinctly more common in children. Thus, the effect of aspirin treatment for a viral illness is very clearly modified by age. In this situation, computing an overall estimate of association is misleading. One common way of dealing with effect modification is examine the association separately for each level of the third variable. For example, if one were to calculate the odds ratio for the association between aspirin treatment during a viral infection and development of Reyes syndrome, the odds ratio would be substantially greater in children than in adults. As another example, suppose a clinical trial is conducted and the drug is shown to result in a statistically significant reduction in total cholesterol. However, suppose that with closer scrutiny of the data, the investigators find that the drug is only effective in subjects with a specific genetic marker and that there is no effect in persons who do not possess the marker. The effect of the treatment is different depending on the presence or absence of the genetic marker. This is an example of effect modification or quotstatistical interactionquot. Effect Modification with a Continuous Outcome Evaluation of a Drug to Increase HDL Cholesterol Consider the following clinical trial conducted to evaluate the efficacy of a new drug to increase HDL cholesterol (the quotgoodquot cholesterol). One hundred patients are enrolled in the trial and randomized to receive either the new drug or a placebo. Background characteristics (e. g. age, sex, educational level, income) and clinical characteristics (e. g. height, weight, blood pressure, total and HDL cholesterol levels) are measured at baseline, and they are found to be comparable in the two comparison groups. Subjects are instructed to take the assigned medication for 8 weeks, at which time their HDL cholesterol is measured again. The results are shown in the table below. On average, the mean HDL levels are very similar in treated and untreated women, but the mean HDL levels are 6.19 units higher in men treated with the new drug. This is an example of effect modification by sex, i. e. the effect of the drug on HDL cholesterol is different for men and women. In this case there is no apparent effect in women, but there appears to be a moderately large effect in men. (Note, however, that the comparison in men is based on a very small sample size, so this difference should be interpreted cautiously, since it could be the result of random error or confounding. When there is effect modification, analysis of the pooled data can be misleading. In this example, the pooled data (men and women combined), shows no effect of treatment. Because there is effect modification by sex, it is important to look at the differences in HDL levels among men and women, considered separately. In stratified analyses, however, investigators must be careful to ensure that the sample size is adequate to provide a meaningful analysis. Effect Modification with a Dichotomous Outcome Consider the following hypothetical study comparing hospitalization after a motor vehicle collision for male and female drivers. Crude risk ratio1.44 Stratum-specific risk ratio1.80 Stratum-specific risk ratio0.93 In this case, the crude analysis suggests an association between male gender and freque ncy of hospitalization for motor vehicle collisions. However, if we stratify this by age, we see a strong association with male gender in subjects lt40 years old, but no association in subjects 50. Perhaps males lt40 years old driver more recklessly than their female counterparts, but after age 40 driving aggression becomes similar in males and females. Another good example of effect modification is seen with skin cancers. It is well established that excessive exposure to UV irradiation increases ones risk of skin cancer. However, the risk of UV-induced skin cancer is 1,000 times greater in people with xeroderma pigmentosum. This is a rate hereditary defect (autosomal recessive) in the enzyme system that repairs UV-induced damage to DNA. It is characterized by photosensitivity, pigmentary changes, premature skin aging, and greatly increased susceptibility to malignant tumor development. If effect modification is present, it is NOT appropriate to use Mantel-Haenszel methods to combine the stratum-specific measures of association into a single pooled measurement. Effect modification is a biological phenomenon that should be described, so the stratum-specific estimates should be reported separately. In contrast, confounding is a distortion of the true association caused by an imbalance of some other risk factor. If there is only confounding: The stratum-specific measures of association will be similar to one another, but they will be different from the overall crude estimate by 10 or more. In this situation, one can use Mantel-Haenszel methods to calculate a pooled estimate (RR or OR) and p-value. If there is neither confounding nor effect modification: The crude estimate of association and the stratum-specific estimates will be similar. They dont have to be identical, just similar. If there is only effect modification: The stratum-specific estimates will differ from one another significantly. Whether they are quotsignificantly differentquot can be tested by using a chi-square test of homogeneity, as described in the Aschengrau amp Seage textbook. If there is both effect modification and confounding: Here, you need to consider two possibilities: 1) If the stratum-specific estimates differ from one another, and they are both less than the crude estimate or if they are both greater than the crude estimate, then there is both confounding and effect modification. 2) If the stratum-specific estimates differ from one another, and the crude estimate is between the two stratum-specific estimates, then you need to pool the stratum-specific estimates (with a Mantel-Haenszel equation) to determine whether the pooled estimate is more than 10 different from the crude estimate. Note that in this situation you are only pooling the stratum-specific estimates in order to make a decision about whether confounding is present you should not report the pooled estimate as an quotadjustedquot measure of association if there is effect modification Statistical Interaction versus Biological Interaction While the discussion above provides a standard description of effect modification, but on closer scrutiny the concept of effect modification is more complicated than this. Consider the figure below (adapted from KJ Rothman: Epidemiology - An Introduction, Oxford University Press, 2002.) We see two scenarios in which incidence rates in exposed and unexposed individuals are assessed at different ages. Rate ratio and rate difference are both measures of effect, but depending on which we use, our conclusions about effect modification differ. In the first scenario the rate difference remains constant across the spectrum of age, suggesting no effective modification. However, the rate ratio decreases with increasing age (RR3 at age 15 RR1.5 at age 75). In the second scenario the rate ratio remains relatively constant, but the rate difference increases with age. Our conclusion regarding whether or not there is effect modification will depend on which measure of effect we use. Consider also the hypothetical data on the risk of lung cancer in smokers and non-smokers, both with and without exposure to asbestos (also adapted from Rothman). Table - Hypothetical 1-Year Risk of Lung Cancer per 100,000 First consider the effect of asbestos on the risk associated with smoking. The risk ratio is 5 both with and without asbestos exposure, suggesting no effect modification. However, the risk difference 4 per 100,000 without asbestosis and 40 per 100,000 with asbestosis exposure. This effect measure is clearly modified by asbestos. We can also look at the effect of smoking on the risk associated with asbestos. The risk ratio for asbestos exposure compared to no asbestos exposure is 10 in both smokers and non-smokers, suggesting an absence of effect modification. However, the risk difference is 45 per 100,000 in the presence of smoking, but only 9 per 100,000 in the absence of smoking. Thus, the risk ratios suggest no effect modification, but the risk differences suggest substantial effect modification. Rothman argues that this ambiguity regarding effect measure modification and statistical interaction makes it important to make a distinction between statistical interaction (which is ambigous) and biological interaction (which is not ambiguous it is either present or absent.) Biological interaction between two causes occurs if the effect of one is dependent on the presence of the other. For example, exposure to the measles virus is a component cause of developing measles, but it is dependent on another factor, i. e. the immune status of the exposed individual. Someone who is immune because of vaccination or having already had measles will not experience any effect from exposure to the measles virus. A discussion of the methods for measuring biological interaction is beyond the scope of this module. Those who are interested should refer to the discussion in Rothmans excellent text. The director of the surgical trauma service at Boston Medical Center suspected that elderly drivers (age 70) had inordinately poor outcomes compared to younger drivers after being in a motor vehicle collision (MVC). His research hypothesis was tested using data from the Boston Medical Center Trauma registry and data from the National Trauma Data Bank. Are there any factors that might confound the association between being al elderly driver and the risk of death after a motor vehicle collision If so, what factors would you consider How would you deal with these potential confounders The figure below summarizes some of the data obtained from the Boston Medical Center Trauma registry. The upper contingency table shows deaths among the 74 elderly drivers hospitalized after an MVC and the 960 younger drivers who had been hospitalized after an MVC. The lower two tables summarize the findings after stratifying based on whether the drivers had the benefit of safety devices (seat belt buckled andor air bag in the vehicle. Do these findings suggest the presence of effect modification Why or why not Stratified by Use of a Safety Restraint: Unrestrained (no seatbelt or air bag): Restrained with Seatbelt, Air Bag, or Both Try to answer these questions on your own. Then proceed to the next page to see the answers. Answer to Final Questions Regarding Death Rates in Elderly Drivers Are there any factors that might confound the association between being al elderly driver and the risk of death after a motor vehicle collision If so, what factors would you consider How would you deal with these potential confounders The figure below summarizes some of the data obtained from the Boston Medical Center Trauma registry. The upper contingency table shows deaths among the 74 elderly drivers hospitalized after an MVC and the 960 younger drivers who h ad been hospitalized after an MVC. The lower two tables summarize the findings after stratifying based on whether the drivers had the benefit of safety devices (seat belt buckled andor air bag in the vehicle. Do these findings suggest the presence of effect modification Why or why not Crude risk ratio 6.75 Stratified by Use of a Safety Restraint: Unrestrained (no seatbelt or air bag): Stratum-specific risk ratio 9.54 Restrained with Seatbelt, Air Bag, or Both Stratum-specific risk ratio 4.90 One can think of a number potential confounding factors such as speed of the two vehicles, type of vehicle (e. g. a small light car versus a sturdy vehicle with good protection, site of impact (drivers side versus passenger side), severity of injuries, general health of the the driver prior to the accident, etc. One could explore confounding by these factors by first performing a series of stratified analyses. One might then use multiple logistic regression to simultaneously adjust for several confounding factors. The risk of death was substantially greater in elderly drivers regardless or restratint use. However, unrestrained elderly drivers had almost a ten-fold increase in death rate compared to younger drivers, whereas restrained elderly drivers had a five fold increase in death rates compared to younger drivers. Therefore the effect of age on risk of death after a car crash was different depending on wether restraints were in use. There is good evidence for effect modification here because the stratum-specific measures of association are substantially different.

No comments:

Post a Comment