As Rui noted, to get a trend you need to focus on percent gray vs age since 
hair color is not an ordinal/rank variable. Then use a measure of association 
designed for rank variables of which there are many: Spearman’s r, Kendall’s 
tau, gamma, tau-c, Somers-d. All of them are available in package DescTools.

David C

From: vod vos [mailto:vod...@zoho.com]
Sent: Tuesday, January 10, 2017 6:03 AM
To: David L Carlson
Cc: Rui Barradas; r-help
Subject: Re: [R] how to proof the trend of two columns of data?

as far as I know,  ?kruskal.test will show us the differences between three or 
more groups. But it could show the trend.


---- On 星期一, 09 一月 2017 10:12:14 -0800 David L Carlson 
<dcarl...@tamu.edu<mailto:dcarl...@tamu.edu>> wrote ----

The list does not assist with homework problems. If this is not a class 
assignment, you should be more specific about what you have tried and provide a 
reproducible example (a sample of the real data or some made-up data that has 
the same columns and data types). In the meantime you could also try the 
following R command:

> ?kruskal.test

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: R-help 
[mailto:r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org>] On 
Behalf Of Rui Barradas
Sent: Monday, January 9, 2017 11:28 AM
To: vod vos; r-help
Subject: Re: [R] how to proof the trend of two columns of data?

Hello,

Inline.

Em 09-01-2017 14:55, vod vos escreveu:
> Hello everyone,
>
>
>
> If there are two columns, one is age (numeric, cut to several groups), the 
> other is hair color type(factor: yellow, black, white).
>
>
>
> If the age column is not normal distributed

If you use ?lm, it's the residuals that should be normally distributed,
not age.
You can also use ?glm with a binomial link, in which case you should
recode type as white/not white.

Hope this helps,

Rui Barradas

, which statistic method should use to prove the trend relationship
between them, for example, the older has more probability of white hair
type? Are there any existed R package to figure out this situation?
>
>
>
> Thank you.
>
>
>
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org<mailto:R-help@r-project.org> mailing list -- To 
> UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help<https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=U9wEEeg-qBbAGd3kjbAL6vlYC7cHatQHXWCc216ugVA&e=>
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=cvDboOH1gMUry-kXLtHgdlh4ICbrTPQE9fjNNO2xPho&e=>
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
R-help@r-project.org<mailto:R-help@r-project.org> mailing list -- To 
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help<https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=U9wEEeg-qBbAGd3kjbAL6vlYC7cHatQHXWCc216ugVA&e=>
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=cvDboOH1gMUry-kXLtHgdlh4ICbrTPQE9fjNNO2xPho&e=>
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org<mailto:R-help@r-project.org> mailing list -- To 
UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help<https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=U9wEEeg-qBbAGd3kjbAL6vlYC7cHatQHXWCc216ugVA&e=>
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=veMGHMCNZShld-KX-bIj4jRE_tP9ojUvB_Lqp0ieSdk&m=dYbJ1jQFhNgZSpX0dKdCO9D4cZWmkFMSAQSB3IC3bgY&s=cvDboOH1gMUry-kXLtHgdlh4ICbrTPQE9fjNNO2xPho&e=>
and provide commented, minimal, self-contained, reproducible code.




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to