[R] How to decide weight in WLS model in R ?

2015-03-02 Thread Yan Wu
Hi, I would like to know how to decide the weight in a WLS model in R? For example, In the pipeline data from faraway, I try to fit a regression model Lab ~ Field (non-constant variance). I wish to use weights to account for the non-constant variance. So how to decide the weight in the WLS

[R] measure of goodness of fit for the model without an intercept

2015-01-29 Thread Yan Wu
Hi, When I fit the regression model without an intercept term, R-squared tends to much larger than the R-squared in the model with an intercept. So in this case, what�s a more reasonable measure of the goodness of fit for the model without an intercept? Thanks a lot!! Yan

[R] Help with a for complex for loop that looks into another data frame

2014-11-07 Thread Yan Wu
, the NAs will be 1, and the sum of ls_flag will be 1. Then it should go into master_df_ex again, and assign a -1 to line 4. Then the summary will have 0 and 0 and this date should be done. I hope that makes sense! Any help is appreciated! Thank you very much. -- Yan Wu 510-333-3188 http