[R] Grouped Regression

Redding, Matthew ReddinM at prose.dpi.qld.gov.au
Mon Oct 1 07:44:38 CEST 2001


HI All R Gurus, 

Please reply directly to this email if you have a suggestion, as I am not
currently an R-help member.

I would like to complete a non-linear regression with groups.  Having gone
down the path of completing such
things under GENSTAT, I would prefer to do it with R.

My example data set is...

 TimeTreat    ExtrVol2     SorbedT
         ET1        39.5       384.5
         ET1        78.7       305.2
         ET1       118.0       261.5
         ET1       157.6       233.7
         ET1       197.5       206.3
         ET2        37.5       422.1
         ET2        74.8       405.5
         ET2       112.0       382.6
         ET2       149.7       361.8
         ET2       187.4       347.7

To do a straightforward nls on the data, some code like this would be
necessary...

char<-read.table("O:/R_STH/L_TBA/P_IndSer/IntLive/Ilem_Research/Matt/Incubat
ion/Desorption Isotherms/RWork/DPIAds.txt", header=TRUE)
library(NLS)
test1<-nls(SorbedT~A + B/(1 + D*ExtrVol2), data=char, start=list(A=200,B=80,
D=0.003),trace=TRUE)
summary(test1)


Given this code, How do I alter it to group regression based on the factor
TimeTreat, and provide a comparison of the 
results?

Thanks, 

Matt Redding



********************************DISCLAIMER****************************
The information contained in the above e-mail message or messages 
(which includes any attachments) is confidential and may be legally 
privileged.  It is intended only for the use of the person or entity 
to which it is addressed.  If you are not the addressee any form of 
disclosure, copying, modification, distribution or any action taken 
or omitted in reliance on the information is unauthorised.  Opinions 
contained in the message(s) do not necessarily reflect the opinions 
of the Queensland Government and its authorities.  If you received 
this communication in error, please notify the sender immediately and 
delete it from your computer system network.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list