Dear all I have data like this> dput(temp)temp <- structure(list(X1 = c(93, 82, NA, 93, 93, 79, 79, 93, 93, 85, 82, 93, 87, 93, 92, NA, 87, 93, 93, 93, 74, 77, 87, 93, 82, 87, 75, 82, 93, 92, 68, 93, 93, 73, NA, 85, 81, 79, 75, 87, 93, NA, 87, 87, 85, 92, 87, 92, 93, 87, 87, NA, 69, 87, 93, 87, 93, 87, 82, 79, 87, 93, 87, 80, 87, 87, 87, 92, 93, 69, 76, 87, 82, 93, 82, NA, 54, 87, 77, 73, 93, 82, 73, 93, 92, 82, 77, 93, 87, 75, 87, 87, 87, 60, 92, 87, 87, NA, 77, 78), X2 = c(224, 624, NA, 224, 224, 642, 642, 224, 224, 599, 622, 224, 239, 224, 225, NA, 239, 224, 224, 224, 688, 657, 239, 224, 624, 239, 672, 254, 224, 225, 499, 224, 224, 692, NA, 599, 627, 642, 677, 239, 224, NA, 239, 239, NA, 375, 239, 375, 224, 239, 239, NA, 299, 239, 224, 239, 224, 239, 621, 642, 239, 224, 239, 638, 239, 239, 239, 225, 224, 299, 672, 239, 618, 224, 620, NA, 626, 239, 657, 693, 224, 624, 693, 224, 225, 621, 657, 224, 239, 673, 239, 239, 239, 569, 224, 239, 239, NA, 657, 651)), .Names = c("X1", "X2"), row.names = c(NA, -100L), class = "data.frame")>You can see there are 3 distinct linear relationships of those 2 variables. plot(1/temp[,1], temp[,2]) Is there any simple way how to evaluate such data without grouping variable? I know that in case I have proper grouping variable I can evaluate it with lme and get intercepts and/or slopes. My question is: Does anybody know about a way/package/function which can give me appropriate grouping of such data or which can give me separate slope/intercept for each set. I hope I expressed my problem clearly. Best regards Petr ________________________________ Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou ur?eny pouze jeho adres?t?m. Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? neprodlen? jeho odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie vyma?te ze sv?ho syst?mu. Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat. Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi ?i zpo?d?n?m p?enosu e-mailu. V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?: - vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? smlouvy, a to z jak?hokoliv d?vodu i bez uveden? d?vodu. - a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout; Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany p??jemce s dodatkem ?i odchylkou. - trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve v?slovn?m dosa?en?m shody na v?ech jej?ch n?le?itostech. - odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za spole?nost ??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n nebo p?semn? pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto emailu p??padn? osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich existence je adres?tovi ?i osob? j?m zastoupen? zn?m?. This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. If you received this e-mail by mistake, please immediately inform its sender. Delete the contents of this e-mail with all attachments and its copies from your system. If you are not the intended recipient of this e-mail, you are not authorized to use, disseminate, copy or disclose this e-mail in any manner. The sender of this e-mail shall not be liable for any possible damage caused by modifications of the e-mail or by delay with transfer of the email. In case that this e-mail forms part of business dealings: - the sender reserves the right to end negotiations about entering into a contract in any time, for any reason, and without stating any reasoning. - if the e-mail contains an offer, the recipient is entitled to immediately accept such offer; The sender of this e-mail (offer) excludes any acceptance of the offer on the part of the recipient containing any amendment or variation. - the sender insists on that the respective contract is concluded only upon an express mutual agreement on all its aspects. - the sender of this e-mail informs that he/she is not authorized to enter into any contracts on behalf of the company except for cases in which he/she is expressly authorized to do so in writing, and such authorization or power of attorney is submitted to the recipient or the person represented by the recipient, or the existence of such authorization is known to the recipient of the person represented by the recipient.
Try the mclust package: library(mclust) temp.na <- na.omit(temp) fm <- Mclust(temp.na) g <- fm$classification plot(temp.na, pch = g, col = g) On Tue, Feb 2, 2016 at 6:35 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote:> Dear all > > I have data like this > >> dput(temp) > > temp <- structure(list(X1 = c(93, 82, NA, 93, 93, 79, 79, 93, 93, 85, > 82, 93, 87, 93, 92, NA, 87, 93, 93, 93, 74, 77, 87, 93, 82, 87, > 75, 82, 93, 92, 68, 93, 93, 73, NA, 85, 81, 79, 75, 87, 93, NA, > 87, 87, 85, 92, 87, 92, 93, 87, 87, NA, 69, 87, 93, 87, 93, 87, > 82, 79, 87, 93, 87, 80, 87, 87, 87, 92, 93, 69, 76, 87, 82, 93, > 82, NA, 54, 87, 77, 73, 93, 82, 73, 93, 92, 82, 77, 93, 87, 75, > 87, 87, 87, 60, 92, 87, 87, NA, 77, 78), X2 = c(224, 624, NA, > 224, 224, 642, 642, 224, 224, 599, 622, 224, 239, 224, 225, NA, > 239, 224, 224, 224, 688, 657, 239, 224, 624, 239, 672, 254, 224, > 225, 499, 224, 224, 692, NA, 599, 627, 642, 677, 239, 224, NA, > 239, 239, NA, 375, 239, 375, 224, 239, 239, NA, 299, 239, 224, > 239, 224, 239, 621, 642, 239, 224, 239, 638, 239, 239, 239, 225, > 224, 299, 672, 239, 618, 224, 620, NA, 626, 239, 657, 693, 224, > 624, 693, 224, 225, 621, 657, 224, 239, 673, 239, 239, 239, 569, > 224, 239, 239, NA, 657, 651)), .Names = c("X1", "X2"), row.names = c(NA, > -100L), class = "data.frame") >> > > You can see there are 3 distinct linear relationships of those 2 variables. > > plot(1/temp[,1], temp[,2]) > > Is there any simple way how to evaluate such data without grouping variable? I know that in case I have proper grouping variable I can evaluate it with lme and get intercepts and/or slopes. > > My question is: > > Does anybody know about a way/package/function which can give me appropriate grouping of such data or which can give me separate slope/intercept for each set. > > I hope I expressed my problem clearly. > > Best regards > Petr > > > ________________________________ > Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou ur?eny pouze jeho adres?t?m. > Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? neprodlen? jeho odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie vyma?te ze sv?ho syst?mu. > Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat. > Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi ?i zpo?d?n?m p?enosu e-mailu. > > V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?: > - vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? smlouvy, a to z jak?hokoliv d?vodu i bez uveden? d?vodu. > - a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout; Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany p??jemce s dodatkem ?i odchylkou. > - trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve v?slovn?m dosa?en?m shody na v?ech jej?ch n?le?itostech. > - odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za spole?nost ??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n nebo p?semn? pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto emailu p??padn? osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich existence je adres?tovi ?i osob? j?m zastoupen? zn?m?. > > This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. > If you received this e-mail by mistake, please immediately inform its sender. Delete the contents of this e-mail with all attachments and its copies from your system. > If you are not the intended recipient of this e-mail, you are not authorized to use, disseminate, copy or disclose this e-mail in any manner. > The sender of this e-mail shall not be liable for any possible damage caused by modifications of the e-mail or by delay with transfer of the email. > > In case that this e-mail forms part of business dealings: > - the sender reserves the right to end negotiations about entering into a contract in any time, for any reason, and without stating any reasoning. > - if the e-mail contains an offer, the recipient is entitled to immediately accept such offer; The sender of this e-mail (offer) excludes any acceptance of the offer on the part of the recipient containing any amendment or variation. > - the sender insists on that the respective contract is concluded only upon an express mutual agreement on all its aspects. > - the sender of this e-mail informs that he/she is not authorized to enter into any contracts on behalf of the company except for cases in which he/she is expressly authorized to do so in writing, and such authorization or power of attorney is submitted to the recipient or the person represented by the recipient, or the existence of such authorization is known to the recipient of the person represented by the recipient. > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.-- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Hi Thanks, it work for my example, which is actually a subset of a bigger data (4000 rows) with the same characteristics. For the whole problem it does not give correct clustering. I tried to set G to 3 but it did not help either. I attached the whole dataset (dput) that you can use, however after quick tour through Mclust it seems to me that it is designed for slightly different problem. Here is the result with whole data. fm <- Mclust(temp) g <- fm$classification plot(1/temp[,1], temp[,2], pch = g, col = g) I will go through the docs more thoroughly, to be 100% sure I did not miss anything. Cheers Petr> -----Original Message----- > From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com] > Sent: Tuesday, February 02, 2016 1:20 PM > To: PIKAL Petr > Cc: R Help R > Subject: Re: [R] fancy linear model and grouping > > Try the mclust package: > > library(mclust) > temp.na <- na.omit(temp) > fm <- Mclust(temp.na) > g <- fm$classification > plot(temp.na, pch = g, col = g) > > > > On Tue, Feb 2, 2016 at 6:35 AM, PIKAL Petr <petr.pikal at precheza.cz> > wrote: > > Dear all > > > > I have data like this > > > >> dput(temp) > > > > temp <- structure(list(X1 = c(93, 82, NA, 93, 93, 79, 79, 93, 93, 85, > > 82, 93, 87, 93, 92, NA, 87, 93, 93, 93, 74, 77, 87, 93, 82, 87, 75, > > 82, 93, 92, 68, 93, 93, 73, NA, 85, 81, 79, 75, 87, 93, NA, 87, 87, > > 85, 92, 87, 92, 93, 87, 87, NA, 69, 87, 93, 87, 93, 87, 82, 79, 87, > > 93, 87, 80, 87, 87, 87, 92, 93, 69, 76, 87, 82, 93, 82, NA, 54, 87, > > 77, 73, 93, 82, 73, 93, 92, 82, 77, 93, 87, 75, 87, 87, 87, 60, 92, > > 87, 87, NA, 77, 78), X2 = c(224, 624, NA, 224, 224, 642, 642, 224, > > 224, 599, 622, 224, 239, 224, 225, NA, 239, 224, 224, 224, 688, 657, > > 239, 224, 624, 239, 672, 254, 224, 225, 499, 224, 224, 692, NA, 599, > > 627, 642, 677, 239, 224, NA, 239, 239, NA, 375, 239, 375, 224, 239, > > 239, NA, 299, 239, 224, 239, 224, 239, 621, 642, 239, 224, 239, 638, > > 239, 239, 239, 225, 224, 299, 672, 239, 618, 224, 620, NA, 626, 239, > > 657, 693, 224, 624, 693, 224, 225, 621, 657, 224, 239, 673, 239, 239, > > 239, 569, 224, 239, 239, NA, 657, 651)), .Names = c("X1", "X2"), > > row.names = c(NA, -100L), class = "data.frame") > >> > > > > You can see there are 3 distinct linear relationships of those 2 > variables. > > > > plot(1/temp[,1], temp[,2]) > > > > Is there any simple way how to evaluate such data without grouping > variable? I know that in case I have proper grouping variable I can > evaluate it with lme and get intercepts and/or slopes. > > > > My question is: > > > > Does anybody know about a way/package/function which can give me > appropriate grouping of such data or which can give me separate > slope/intercept for each set. > > > > I hope I expressed my problem clearly. > > > > Best regards > > Petr > > > >________________________________ Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou ur?eny pouze jeho adres?t?m. Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? neprodlen? jeho odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie vyma?te ze sv?ho syst?mu. Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat. Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi ?i zpo?d?n?m p?enosu e-mailu. V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?: - vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? smlouvy, a to z jak?hokoliv d?vodu i bez uveden? d?vodu. - a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout; Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany p??jemce s dodatkem ?i odchylkou. - trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve v?slovn?m dosa?en?m shody na v?ech jej?ch n?le?itostech. - odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za spole?nost ??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n nebo p?semn? pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto emailu p??padn? osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich existence je adres?tovi ?i osob? j?m zastoupen? zn?m?. This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. If you received this e-mail by mistake, please immediately inform its sender. Delete the contents of this e-mail with all attachments and its copies from your system. If you are not the intended recipient of this e-mail, you are not authorized to use, disseminate, copy or disclose this e-mail in any manner. The sender of this e-mail shall not be liable for any possible damage caused by modifications of the e-mail or by delay with transfer of the email. In case that this e-mail forms part of business dealings: - the sender reserves the right to end negotiations about entering into a contract in any time, for any reason, and without stating any reasoning. - if the e-mail contains an offer, the recipient is entitled to immediately accept such offer; The sender of this e-mail (offer) excludes any acceptance of the offer on the part of the recipient containing any amendment or variation. - the sender insists on that the respective contract is concluded only upon an express mutual agreement on all its aspects. - the sender of this e-mail informs that he/she is not authorized to enter into any contracts on behalf of the company except for cases in which he/she is expressly authorized to do so in writing, and such authorization or power of attorney is submitted to the recipient or the person represented by the recipient, or the existence of such authorization is known to the recipient of the person represented by the recipient. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: temp.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20160202/7e7a35c0/attachment.txt>
Perhaps you can try clustering the output of the Hough transform. PET::hough() will compute it, given a matrix like gplots::hist2d(1/temp[,1],temp[,2])$hData. I do not have much experience here. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Feb 2, 2016 at 3:35 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote:> Dear all > > I have data like this > > > dput(temp) > > temp <- structure(list(X1 = c(93, 82, NA, 93, 93, 79, 79, 93, 93, 85, > 82, 93, 87, 93, 92, NA, 87, 93, 93, 93, 74, 77, 87, 93, 82, 87, > 75, 82, 93, 92, 68, 93, 93, 73, NA, 85, 81, 79, 75, 87, 93, NA, > 87, 87, 85, 92, 87, 92, 93, 87, 87, NA, 69, 87, 93, 87, 93, 87, > 82, 79, 87, 93, 87, 80, 87, 87, 87, 92, 93, 69, 76, 87, 82, 93, > 82, NA, 54, 87, 77, 73, 93, 82, 73, 93, 92, 82, 77, 93, 87, 75, > 87, 87, 87, 60, 92, 87, 87, NA, 77, 78), X2 = c(224, 624, NA, > 224, 224, 642, 642, 224, 224, 599, 622, 224, 239, 224, 225, NA, > 239, 224, 224, 224, 688, 657, 239, 224, 624, 239, 672, 254, 224, > 225, 499, 224, 224, 692, NA, 599, 627, 642, 677, 239, 224, NA, > 239, 239, NA, 375, 239, 375, 224, 239, 239, NA, 299, 239, 224, > 239, 224, 239, 621, 642, 239, 224, 239, 638, 239, 239, 239, 225, > 224, 299, 672, 239, 618, 224, 620, NA, 626, 239, 657, 693, 224, > 624, 693, 224, 225, 621, 657, 224, 239, 673, 239, 239, 239, 569, > 224, 239, 239, NA, 657, 651)), .Names = c("X1", "X2"), row.names = c(NA, > -100L), class = "data.frame") > > > > You can see there are 3 distinct linear relationships of those 2 variables. > > plot(1/temp[,1], temp[,2]) > > Is there any simple way how to evaluate such data without grouping > variable? I know that in case I have proper grouping variable I can > evaluate it with lme and get intercepts and/or slopes. > > My question is: > > Does anybody know about a way/package/function which can give me > appropriate grouping of such data or which can give me separate > slope/intercept for each set. > > I hope I expressed my problem clearly. > > Best regards > Petr > > > ________________________________ > Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou > ur?eny pouze jeho adres?t?m. > Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? > neprodlen? jeho odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie > vyma?te ze sv?ho syst?mu. > Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email > jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat. > Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi > ?i zpo?d?n?m p?enosu e-mailu. > > V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?: > - vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? > smlouvy, a to z jak?hokoliv d?vodu i bez uveden? d?vodu. > - a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout; > Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany > p??jemce s dodatkem ?i odchylkou. > - trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve > v?slovn?m dosa?en?m shody na v?ech jej?ch n?le?itostech. > - odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za > spole?nost ??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n > nebo p?semn? pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto > emailu p??padn? osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich > existence je adres?tovi ?i osob? j?m zastoupen? zn?m?. > > This e-mail and any documents attached to it may be confidential and are > intended only for its intended recipients. > If you received this e-mail by mistake, please immediately inform its > sender. Delete the contents of this e-mail with all attachments and its > copies from your system. > If you are not the intended recipient of this e-mail, you are not > authorized to use, disseminate, copy or disclose this e-mail in any manner. > The sender of this e-mail shall not be liable for any possible damage > caused by modifications of the e-mail or by delay with transfer of the > email. > > In case that this e-mail forms part of business dealings: > - the sender reserves the right to end negotiations about entering into a > contract in any time, for any reason, and without stating any reasoning. > - if the e-mail contains an offer, the recipient is entitled to > immediately accept such offer; The sender of this e-mail (offer) excludes > any acceptance of the offer on the part of the recipient containing any > amendment or variation. > - the sender insists on that the respective contract is concluded only > upon an express mutual agreement on all its aspects. > - the sender of this e-mail informs that he/she is not authorized to enter > into any contracts on behalf of the company except for cases in which > he/she is expressly authorized to do so in writing, and such authorization > or power of attorney is submitted to the recipient or the person > represented by the recipient, or the existence of such authorization is > known to the recipient of the person represented by the recipient. > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.[[alternative HTML version deleted]]
Hi Bill and Gabor Thank you for your answers. PET approach is quite interesting but as I hardly understand what it really does it seems to me rather complicated to use it properly. OTOH using Mclust is quite understandable and what is important it provides correct grouping after I used EEV model. As usual, Rhelp is powerful tool for getting answers if one tries to keep Posting guide rules. Cheers Petr From: William Dunlap [mailto:wdunlap at tibco.com] Sent: Tuesday, February 02, 2016 6:09 PM To: PIKAL Petr Cc: R Help R Subject: Re: [R] fancy linear model and grouping Perhaps you can try clustering the output of the Hough transform. PET::hough() will compute it, given a matrix like gplots::hist2d(1/temp[,1],temp[,2])$hData. I do not have much experience here. Bill Dunlap TIBCO Software wdunlap tibco.com<http://tibco.com> On Tue, Feb 2, 2016 at 3:35 AM, PIKAL Petr <petr.pikal at precheza.cz<mailto:petr.pikal at precheza.cz>> wrote: Dear all I have data like this> dput(temp)temp <- structure(list(X1 = c(93, 82, NA, 93, 93, 79, 79, 93, 93, 85, 82, 93, 87, 93, 92, NA, 87, 93, 93, 93, 74, 77, 87, 93, 82, 87, 75, 82, 93, 92, 68, 93, 93, 73, NA, 85, 81, 79, 75, 87, 93, NA, 87, 87, 85, 92, 87, 92, 93, 87, 87, NA, 69, 87, 93, 87, 93, 87, 82, 79, 87, 93, 87, 80, 87, 87, 87, 92, 93, 69, 76, 87, 82, 93, 82, NA, 54, 87, 77, 73, 93, 82, 73, 93, 92, 82, 77, 93, 87, 75, 87, 87, 87, 60, 92, 87, 87, NA, 77, 78), X2 = c(224, 624, NA, 224, 224, 642, 642, 224, 224, 599, 622, 224, 239, 224, 225, NA, 239, 224, 224, 224, 688, 657, 239, 224, 624, 239, 672, 254, 224, 225, 499, 224, 224, 692, NA, 599, 627, 642, 677, 239, 224, NA, 239, 239, NA, 375, 239, 375, 224, 239, 239, NA, 299, 239, 224, 239, 224, 239, 621, 642, 239, 224, 239, 638, 239, 239, 239, 225, 224, 299, 672, 239, 618, 224, 620, NA, 626, 239, 657, 693, 224, 624, 693, 224, 225, 621, 657, 224, 239, 673, 239, 239, 239, 569, 224, 239, 239, NA, 657, 651)), .Names = c("X1", "X2"), row.names = c(NA, -100L), class = "data.frame")>You can see there are 3 distinct linear relationships of those 2 variables. plot(1/temp[,1], temp[,2]) Is there any simple way how to evaluate such data without grouping variable? I know that in case I have proper grouping variable I can evaluate it with lme and get intercepts and/or slopes. My question is: Does anybody know about a way/package/function which can give me appropriate grouping of such data or which can give me separate slope/intercept for each set. I hope I expressed my problem clearly. Best regards Petr ________________________________ Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou ur?eny pouze jeho adres?t?m. Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? neprodlen? jeho odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie vyma?te ze sv?ho syst?mu. Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat. Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi ?i zpo?d?n?m p?enosu e-mailu. V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?: - vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? smlouvy, a to z jak?hokoliv d?vodu i bez uveden? d?vodu. - a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout; Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany p??jemce s dodatkem ?i odchylkou. - trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve v?slovn?m dosa?en?m shody na v?ech jej?ch n?le?itostech. - odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za spole?nost ??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n nebo p?semn? pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto emailu p??padn? osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich existence je adres?tovi ?i osob? j?m zastoupen? zn?m?. This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. If you received this e-mail by mistake, please immediately inform its sender. Delete the contents of this e-mail with all attachments and its copies from your system. If you are not the intended recipient of this e-mail, you are not authorized to use, disseminate, copy or disclose this e-mail in any manner. The sender of this e-mail shall not be liable for any possible damage caused by modifications of the e-mail or by delay with transfer of the email. In case that this e-mail forms part of business dealings: - the sender reserves the right to end negotiations about entering into a contract in any time, for any reason, and without stating any reasoning. - if the e-mail contains an offer, the recipient is entitled to immediately accept such offer; The sender of this e-mail (offer) excludes any acceptance of the offer on the part of the recipient containing any amendment or variation. - the sender insists on that the respective contract is concluded only upon an express mutual agreement on all its aspects. - the sender of this e-mail informs that he/she is not authorized to enter into any contracts on behalf of the company except for cases in which he/she is expressly authorized to do so in writing, and such authorization or power of attorney is submitted to the recipient or the person represented by the recipient, or the existence of such authorization is known to the recipient of the person represented by the recipient. [[alternative HTML version deleted]]