how to standardize one variable to control for another confounding variable

classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to standardize one variable to control for another confounding variable

lbp@njau.edu.cn
Dera Thierry,
     Thanks for the sugestion. Would you please give me more information about how to standardize one variable
to control for the effect of another confounding one? it would be much helpful to expalin it with a example, as my statistic knowledge is limited.

    I am looking for your reply.

    with best wishes,

     Baoping


> -----原始邮件-----
> 发件人: [hidden email]
> 发送时间: 2016年5月19日 星期四
> 收件人: [hidden email]
> 抄送:
> 主题: R-sig-ecology Digest, Vol 98, Issue 10
>
> Send R-sig-ecology mailing list submissions to
> [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> or, via email, send a message with subject or body 'help' to
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-ecology digest..."
>
>
> Today's Topics:
>
>    1. help ([hidden email])
>    2. Re: help (Thierry Onkelinx)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 19 May 2016 08:39:33 +0800
> From: "[hidden email]" <[hidden email]>
> To: r-sig-ecology <[hidden email]>
> Subject: [R-sig-eco] help
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
>
> Now I have difficulty to choose between two modelling approach. Here is th story. To examine the clutch size laid by a parasitic wasp into caterpillar hosts which varies in age and size, we exposed individual larvae of  three stages, after individually weighed, to parasitism, and the number of wasps emerged from each host (brood size) was recorded. Because host size and stage are mutually counfounding factors, the older the bigger, I have two modelling choices to separate the effect of stage and size. One is to make separate analyses, first analyzing the effct of stages in a model without the variable size, and then analyze the effect of the size under each stgae (several models); another approach is to make one analysis, put stage and size together in the same model to evaluate their separate and interacted effects on brood size.  For the later approach, the variable size actualy contains the inflormation about the stage, thus violating the independence assumation. I am won!
>  dering which appraoch is approriate.
>    
>    Thanks for any help.
>
>   Baoping
>
>
>
>
> E-mail: [hidden email]
> Phone: 86 (25) 84396394
>
> [[alternative HTML version deleted]]
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 19 May 2016 09:55:16 +0200
> From: Thierry Onkelinx <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Cc: r-sig-ecology <[hidden email]>
> Subject: Re: [R-sig-eco] help
> Message-ID:
> <CAJuCY5wP7bdpDX6pPm2t6us1Zgsm0OnhDK0Z_Ji=[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
>
> Dear Baoping,
>
> You could standardize the weight by stage. That would remove the
> confounding between weight and stage.
>
> Best regards,
>
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
> Forest
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> Belgium
>
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> 2016-05-19 2:39 GMT+02:00 [hidden email] <[hidden email]>:
>
> > Now I have difficulty to choose between two modelling approach. Here is th
> > story. To examine the clutch size laid by a parasitic wasp into caterpillar
> > hosts which varies in age and size, we exposed individual larvae of  three
> > stages, after individually weighed, to parasitism, and the number of wasps
> > emerged from each host (brood size) was recorded. Because host size and
> > stage are mutually counfounding factors, the older the bigger, I have two
> > modelling choices to separate the effect of stage and size. One is to make
> > separate analyses, first analyzing the effct of stages in a model without
> > the variable size, and then analyze the effect of the size under each stgae
> > (several models); another approach is to make one analysis, put stage and
> > size together in the same model to evaluate their separate and interacted
> > effects on brood size.  For the later approach, the variable size actualy
> > contains the inflormation about the stage, thus violating the independence
> > assumation. I am won!
> >  dering which appraoch is approriate.
> >
> >    Thanks for any help.
> >
> >   Baoping
> >
> >
> >
> >
> > E-mail: [hidden email]
> > Phone: 86 (25) 84396394
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
> ------------------------------
>
> End of R-sig-ecology Digest, Vol 98, Issue 10
> *********************************************

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to standardize one variable to control for another confounding variable

Bede-Fazekas Ákos
Hello Baoping,

I think that's the solution proposed by Thierry.

 > df <- data.frame(size = runif(20) * 10, stage = c(rep("stage1", 7),
rep("stage2", 7), rep("stage3", 6)))
 > df
         size  stage
1  3.4074887 stage1
2  8.4906095 stage1
3  9.4942578 stage1
4  5.8881368 stage1
5  8.8361620 stage1
6  0.7794099 stage1
7  1.1040311 stage1
8  9.2610258 stage2
9  2.8905632 stage2
10 4.1408304 stage2
11 2.8982138 stage2
12 2.9397847 stage2
13 2.6144625 stage2
14 4.9374664 stage2
15 8.6828374 stage3
16 0.2172812 stage3
17 4.8933184 stage3
18 5.2880694 stage3
19 1.8981373 stage3
20 5.5865985 stage3

 > df$size <- unlist(tapply(X = df$size, INDEX = df$stage, FUN = scale,
simplify = TRUE))
 > df
           size  stage
1  -0.54627592 stage1
2   0.82762513 stage1
3   1.09889813 stage1
4   0.12421080 stage1
5   0.92102343 stage1
6  -1.25661121 stage1
7  -1.16887036 stage1
8   2.11969642 stage2
9  -0.56986326 stage2
10 -0.04201016 stage2
11 -0.56663322 stage2
12 -0.54908230 stage2
13 -0.68643082 stage2
14  0.29432335 stage2
15  1.42580094 stage3
16 -1.41082143 stage3
17  0.15601616 stage3
18  0.28828858 stage3
19 -0.84760338 stage3
20  0.38831913 stage3

HTH,
Ákos Bede-Fazekas
Hungarian Academy of Sciences,
Centre for Ecological Research
Institute of Ecology and Botany

2016.05.21. 3:13 keltezéssel, 李保平 írta:

> Dera Thierry,
>       Thanks for the sugestion. Would you please give me more information about how to standardize one variable
> to control for the effect of another confounding one? it would be much helpful to expalin it with a example, as my statistic knowledge is limited.
>
>      I am looking for your reply.
>
>      with best wishes,
>
>       Baoping
>
>
>> -----原始邮件-----
>> 发件人: [hidden email]
>> 发送时间: 2016年5月19日 星期四
>> 收件人: [hidden email]
>> 抄送:
>> 主题: R-sig-ecology Digest, Vol 98, Issue 10
>>
>> Send R-sig-ecology mailing list submissions to
>> [hidden email]
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>> or, via email, send a message with subject or body 'help' to
>> [hidden email]
>>
>> You can reach the person managing the list at
>> [hidden email]
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of R-sig-ecology digest..."
>>
>>
>> Today's Topics:
>>
>>     1. help ([hidden email])
>>     2. Re: help (Thierry Onkelinx)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 19 May 2016 08:39:33 +0800
>> From: "[hidden email]" <[hidden email]>
>> To: r-sig-ecology <[hidden email]>
>> Subject: [R-sig-eco] help
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> Now I have difficulty to choose between two modelling approach. Here is th story. To examine the clutch size laid by a parasitic wasp into caterpillar hosts which varies in age and size, we exposed individual larvae of  three stages, after individually weighed, to parasitism, and the number of wasps emerged from each host (brood size) was recorded. Because host size and stage are mutually counfounding factors, the older the bigger, I have two modelling choices to separate the effect of stage and size. One is to make separate analyses, first analyzing the effct of stages in a model without the variable size, and then analyze the effect of the size under each stgae (several models); another approach is to make one analysis, put stage and size together in the same model to evaluate their separate and interacted effects on brood size.  For the later approach, the variable size actualy contains the inflormation about the stage, thus violating the independence assumation. I am won!
>>   dering which appraoch is approriate.
>>    
>>     Thanks for any help.
>>
>>    Baoping
>>
>>
>>
>>
>> E-mail: [hidden email]
>> Phone: 86 (25) 84396394
>>
>> [[alternative HTML version deleted]]
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Thu, 19 May 2016 09:55:16 +0200
>> From: Thierry Onkelinx <[hidden email]>
>> To: "[hidden email]" <[hidden email]>
>> Cc: r-sig-ecology <[hidden email]>
>> Subject: Re: [R-sig-eco] help
>> Message-ID:
>> <CAJuCY5wP7bdpDX6pPm2t6us1Zgsm0OnhDK0Z_Ji=[hidden email]>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> Dear Baoping,
>>
>> You could standardize the weight by stage. That would remove the
>> confounding between weight and stage.
>>
>> Best regards,
>>
>> ir. Thierry Onkelinx
>> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
>> Forest
>> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
>> Kliniekstraat 25
>> 1070 Anderlecht
>> Belgium
>>
>> To call in the statistician after the experiment is done may be no more
>> than asking him to perform a post-mortem examination: he may be able to say
>> what the experiment died of. ~ Sir Ronald Aylmer Fisher
>> The plural of anecdote is not data. ~ Roger Brinner
>> The combination of some data and an aching desire for an answer does not
>> ensure that a reasonable answer can be extracted from a given body of data.
>> ~ John Tukey
>>
>> 2016-05-19 2:39 GMT+02:00 [hidden email] <[hidden email]>:
>>
>>> Now I have difficulty to choose between two modelling approach. Here is th
>>> story. To examine the clutch size laid by a parasitic wasp into caterpillar
>>> hosts which varies in age and size, we exposed individual larvae of  three
>>> stages, after individually weighed, to parasitism, and the number of wasps
>>> emerged from each host (brood size) was recorded. Because host size and
>>> stage are mutually counfounding factors, the older the bigger, I have two
>>> modelling choices to separate the effect of stage and size. One is to make
>>> separate analyses, first analyzing the effct of stages in a model without
>>> the variable size, and then analyze the effect of the size under each stgae
>>> (several models); another approach is to make one analysis, put stage and
>>> size together in the same model to evaluate their separate and interacted
>>> effects on brood size.  For the later approach, the variable size actualy
>>> contains the inflormation about the stage, thus violating the independence
>>> assumation. I am won!
>>>   dering which appraoch is approriate.
>>>
>>>     Thanks for any help.
>>>
>>>    Baoping
>>>
>>>
>>>
>>>
>>> E-mail: [hidden email]
>>> Phone: 86 (25) 84396394
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-ecology mailing list
>>> [hidden email]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>> ------------------------------
>>
>> End of R-sig-ecology Digest, Vol 98, Issue 10
>> *********************************************
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Loading...