Dear all,

I got another problem:

if education have five levels

edu=1
edu=2
edu=3
edu=4
edu=5

If I want to appoint y=edu2~4 in 1990
which programs is correct?
I tried this two programs, they both work, but two results is different.

1.
fig2b<-reldist(y=mu1990$wage[mu1990$edu==2|3|4],......)


2.
fig2b<-reldist(y=mu1990$wage[mu1990$edu%in%2:4],......)

which one is correct?
and why they have different results?


All help high appreciated.


best,
Yichih

2009/9/5 Yichih Hsieh <yichih.hsieh@gmail.com>

>
> Dear Petr,
>
> your suggestion is useful
>
> many thanks for your help !
>
>
> best,
> Yichih
>
> 2009/9/3 Petr PIKAL <petr.pikal@precheza.cz>
>
> Hi
>>
>> use any of suitable selection ways that are in R.
>>
>> E.g.
>>
>> data[data$gender==1, ]
>>
>> selects only female values
>>
>> data$wage[(data$gender==1)  & (data$race=1)] selects black female wages.
>>
>> and see also ?subset
>>
>> Regards
>> Petr
>>
>> r-help-bounces@r-project.org napsal dne 03.09.2009 10:51:59:
>>
>> > Dear all,
>> >
>> > I have 1980~1990 eleven datas,
>> > every year have three variables,
>> > wage
>> > gender(1=female, 2=male)
>> > race(1=black, 2=white)
>> >
>> > My original commands is:
>> >
>> > fig2b<-reldist(y=mu1990$wage,yo=mu1980$wage,.......)
>> >
>> > I have three questions:
>> > 1. If I want to appoint y=women's wage in 1990
>> >                                     yo=women's wage in 1980
>> > 2. If I want to appoint y=women's wage in 1990
>> >                                     yo=men's wage in 1990
>> > 3. If I want to appoint y=black women's wage in 1990
>> >                                     yo=white women's wage in 1990
>> >
>> > How can I modify the commands?
>> >
>> > All help highly appreciated.
>> >
>> > Best,
>> > Yichih
>> >
>> >
>> > --
>> > Yichih Hsieh
>> >
>> > e-mail : yichih.hsieh@gmail.com
>> >
>> >    [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
>
> --
> Yichih Hsieh
>
> e-mail : yichih.hsieh@gmail.com
>



-- 
Yichih Hsieh

e-mail : yichih.hsieh@gmail.com

	[[alternative HTML version deleted]]


