I have data that looks like

YC      Age     Num
82      11      2
83      10      0
84      9       8
85      8       21
86      7       49
87      6       18
88      5       79
89      4       28
90      3       273
91      2       175

with a program 

mod1=lm(log(Num+1)~YC, data=box44) 
plot(log(Num+1)~YC, data=box44, pch=19, xlab="Year Class",
    ylab="Loge Number at age", ylim=c(0,6), xlim=c(91,82))
abline(lm(log(Num+1)~YC), col="blue", lwd=2)
summary(mod1)

I need to regress log(Num+1) against YC, but in descending (91 - 82) order so 
as to get a negative slope and positive intercept.  I can plot the values such 
that the regression line appears correct (the xlim statement), but I can't 
figure out how to force the regression from YC 91 through 82.  A call to the 
rev() function in front of YC does not produce the results I'm looking for.

More than likely, I'm overlooking something.  Thanks for any help you can 
provide.

SR

Steven H. Ranney
Graduate Research Assistant (Ph.D)
USGS Montana Cooperative Fishery Research Unit
Montana State University
PO Box 173460
Bozeman, MT 59717-3460

phone: (406) 994-6643
fax:   (406) 994-7479


        [[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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to