[R] Problem with augPred?
Meissner, Tony (DFW)
Tony.Meissner at sa.gov.au
Tue Sep 28 04:06:16 CEST 2010
I have a dataset, example of the data is shown below:
Grouped Data: drain_irr ~ irr | crop
Year decades crop irrisystem drain_irr irr
1310 1995-96 1990s Citrus various 0.400 9.021
1311 1995-96 1990s Citrus drip 0.541 6.468
1312 1995-96 1990s Citrus overhead 3.308 11.336
1313 1995-96 1990s Citrus undertree 0.400 9.050
1314 1995-96 1990s Citrus undertree 3.485 10.304
1315 1995-96 1990s Citrus undertree 0.400 3.423
Grouped Data: drain_irr ~ irr | crop
Year decades crop irrisystem drain_irr irr
3605 2002-03 2000s WineGrapes drip 0.24738 5.89
3606 2002-03 2000s WineGrapes drip 0.24738 5.89
3607 2002-03 2000s WineGrapes drip 0.20230 5.95
3608 2002-03 2000s WineGrapes drip 0.20230 5.95
3609 2002-03 2000s WineGrapes drip 0.76890 6.99
3610 2002-03 2000s WineGrapes drip 0.76890 6.99
I am using nlsList to fit a model drain_irr~a0*irr^b0 for the crop factor the output of which is shown below:
Call:
Model: drain_irr ~ A0 * irr^B0 | crop
Data: nswdat
Coefficients:
A0
Estimate Std. Error t value Pr(>|t|)
Other 0.00017782 0.00046336 0.38376 6.4108e-01
WineGrapes 0.00891031 0.00240466 3.70544 7.6315e-05
Citrus 0.00142073 0.00092889 1.52949 3.1404e-02
DriedVine 0.03829533 0.01323868 2.89269 8.2945e-02
B0
Estimate Std. Error t value Pr(>|t|)
Other 3.9132 1.01438 3.8577 1.3867e-02
WineGrapes 2.5510 0.12029 21.2068 1.9062e-46
Citrus 3.0921 0.25447 12.1509 1.3566e-21
DriedVine 1.9547 0.14723 13.2762 4.3579e-09
Residual standard error: 0.53998 on 195 degrees of freedom
A plot of the data using qplot from the ggplot2 package gives the follow relationship (nswdat.crop.jpeg)
However, when I use augPred to eg augPred(nswdat.nls00) it gives the following graphic (nswdatcrop.AugP.jpeg)
While citrus and Other are OK compared with the qplot of the raw data, Winegrape and DriedVine are clearly not. Have others encountered this problem with augPred?
I am using R-2.11.1 under Windows XP
Tschüß
Tony Meissner
Principal Scientist - Monitoring
Department for Water | Level 3 28 Vaughan Terrace Berri SA 5343
T 8595 2209 | M 0401 124 971
E tony.meissner at sa.gov.au<mailto:tony.meissner at sa.gov.au>
Mon | Tue | Wed | Thurs | Fri
www.waterforgood.sa.gov.au<http://www.waterforgood.sa.gov.au/> | www.sa.gov.au<http://www.sa.gov.au/>
The information in this e-mail may be confidential and/or legally privileged.
Use or disclosure of the information by anyone other than the intended recipient is prohibited and may be unlawful.
"Imagine" ©
More information about the R-help
mailing list