[R] Apply weights to the Efron Approximation

Bessy piglet630 at hotmail.com
Thu Jul 9 15:32:37 CEST 2009


Dear all,

I want to apply weights to my sample data set and I am struggling with the
Efron Approximation with weights.

I have got one sample data shown as below:

customer	week	arrest	fin	age	race	weight 1	weight 2	weight 3
1	20	1	1	27	1	2	15	2
2	17	1	0	18	1	2	19	1
3	25	1	1	19	0	2	20	1
4	52	0	1	23	1	2	5	1
5	52	0	0	19	0	2	11	1
6	25	1	0	19	0	2	26	1
								
I applied four different weighted Efron Formulas (all are derived by myself)
to the data set above and have got the following results for 3 weight sets
based on those 4 formulas, respectively.

weight 1	Formula 1       Formula 2         Formula 3          Formula 4       
R software	replicated by weights		
fin        -0.235912234  -0.530843641  -0.471823965     -0.471823965  
-0.4718          -0.5308		
age      -0.052005981   -0.122613988	 -0.104018973     -0.104018973   -0.104
-0.1226		
race	0.637573013  1.404345693	  1.275165398	1.275165398     1.2752	  1.4043		
								
weight 2	Formula 1      Formula 2         Formula 3	Formula 4       R
software    replicated by weight		
fin	0.600334761  -0.32212452	  -0.178028949	-0.244162408  -0.25062	-0.32212		
age	0.105321888  -0.214932275	  -0.112459016	-0.146957807  -0.14607	-0.21493		
race	5.742146326  2.258934182	    2.043479975	1.921804334     1.94056
2.25893		
								
weight 3	Formula 1       Formula 2        Formula 3           Formula 4      
R software	replicated by weights		
fin	-0.984946984  -0.909980273  -0.333235566	-0.80272443    -0.802724
-0.90998		
age	0.036891147     0.03225069	   -0.194126398	-0.004544225   -0.004544
0.03225		
race	0.962911927     1.305255425    1.435340831	1.318038014      1.318038
1.30526		

"replicated by weights" means that I also replicated individuals as many
times as indicated by weights and applied unweighted Efron approximation to
the replication of the dataset. 

The formula 4 can give me same results as the unweighted ones if I apply the
same weights to each individual and also can give me the close results to
the ones calculated by R (efron method+weights) if I apply different weights
to each individual. these results are close to the R's but not exactly the
same. 

I don't know why and what the problem is with my formulas. Could anyone give
me some help, please?

I will really appreciate it.

I have attached my four weighted Efron formulas with this message already.
Bessy 
http://www.nabble.com/file/p24410214/Weighted%2BEfron%2BApproximation_Formulas_Examples.pdf
Weighted+Efron+Approximation_Formulas_Examples.pdf 
-- 
View this message in context: http://www.nabble.com/Apply-weights-to-the-Efron-Approximation-tp24410214p24410214.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list