Re: [R] Spatial & Temporal Analysis of Daily Rainfall, Temperature Data

2016-11-08 Thread Henry Utila
Dear R experts,
I have a problem which I don't seem to get to pass. I want to analyze daily
rainfall & temperature data with a lot of missing or unavailable points. I
have been asked to use evd, evir, ismev and geoR packages. I have not used R
before neither do I know any computer languages let alone programming.
I was asked to put my data in excel spreadsheet then convert it into tab
delimited or txt format. The problem am having is importing it into R. it
says factors are not numeric or something like that with a lot of warnings.
Would someone kindly advise how I can solve this problem, please.
Looking forward to your support as R experts.
Thanks.
Henry Utila
MALAWI

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Spencer
Graves
Sent: Tuesday, 8 November, 2016 2:24 PM
To: r-help@r-project.org
Subject: Re: [R] a book recommendation, please [O/T]

   Have you considered Box and Draper (2007) Response Surfaces,
Mixtures, and Ridge Analyses, 2nd Edition?


   You probably know that George Box invented the field of Response 
Surfaces with  Box, G. E. P. and Wilson, K.B. (1951) On the Experimental 
Attainment of Optimum Conditions (with discussion). Journal of the Royal 
Statistical Society Series B13(1):1-45.


   This book describes how to design experiments to get the data to 
optimize a physical process.  I haven't been teaching in academia for 
the past 25 years, but I taught an advanced course from the first 
edition of this book when I did.


   Still, any title "with R" sounds like it's worth reviewing and 
maybe using.


Spencer Graves


On 11/8/2016 12:36 AM, Erin Hodgess wrote:
> I like BH^2 as well as a reference book!  I actually think I will go with
> the DOE with R by Larson.  Thanks to all for the help!
>
> Sincerely,
> Erin
>
>
> On Mon, Nov 7, 2016 at 10:59 PM, Bert Gunter 
wrote:
>
>> Have you looked here:
>>
>> https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck%
>> 3Aexperimental+design=2=experimental+design&
>> ie=UTF8=1478580868
>>
>> I would think your choice depends strongly on the arena of application.
>>
>> Of course I like BH^2, but that was because I was taught by them.
>>
>> Cheers,
>> Bert
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Mon, Nov 7, 2016 at 8:13 PM, Erin Hodgess 
>> wrote:
>>> Hello!
>>>
>>> Could someone recommend a good book on Design of Experiments for a
>> Master's
>>> in Data Analytics, please?
>>>
>>> I use Montgomery's book for my undergrad course, but was thinking about
>>> something a little more advanced for this one.
>>>
>>> Any help much appreciated, particularly with R-related texts.
>>>
>>> Sincerely,
>>> Erin
>>>
>>>
>>> --
>>> Erin Hodgess
>>> Associate Professor
>>> Department of Mathematical and Statistics
>>> University of Houston - Downtown
>>> mailto: erinm.hodg...@gmail.com
>>>
>>>  [[alternative HTML version deleted]]
>>>
>>> __
>>> R-help@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.
>
>

__
R-help@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.

__
R-help@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.


Re: [R] Read in files in r

2016-11-08 Thread Jim Lemon
Hi lily,
My first guess is that the errors are due to trying to open a file like:

"fold1/file1.txt"

as:

"file1.txt"

That is, your code will generate filenames in the directories
fold1,..., without prepending the folder names. Maybe:

result_list<-list()
read_dirs<-paste("fold",1:3,sep="")
rn<-1
for(read_dir in read_dirs) {
 filelist<-list.files(read_dir)
 for(nextfile in filelist) {
  filepath<-paste(read_dir,nextfile,sep="/")
  result_list[[rn]]<-read.table(filepath)
  names(result_list)[rn]<-paste(read_dri,nextfile,sep="_")
  rn<-rn+1
 }
}

Beware: untested.

Jim


On Wed, Nov 9, 2016 at 1:42 PM, lily li  wrote:
> Hi R users,
>
> In the current directory, there are several folders (such as fold1, fold2,
> fold3, etc.), while each folder includes the same named files, such as
> file1.txt, file2.txt, file3.txt, etc. The structures of each folder and
> each file are the same, but with different values. I want to read the files
> from each folder, but can't get it to work. Could you please tell me why?
> Thanks.
>
> rd1 = read.table(file=list.files('fold1')[1], head=T)
> rd2 = read.table(file=list.files('fold1')[2], head=T)
>
> rt1 = read.table(file=list.files('fold2')[1], head=T)
> rt2 = read.table(file=list.files('fold2')[2], head=T)
>
> Then there are the warning sign that 'cannot open file 'file1.txt': No such
> file or directory'
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.

__
R-help@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.


[R] Read in files in r

2016-11-08 Thread lily li
Hi R users,

In the current directory, there are several folders (such as fold1, fold2,
fold3, etc.), while each folder includes the same named files, such as
file1.txt, file2.txt, file3.txt, etc. The structures of each folder and
each file are the same, but with different values. I want to read the files
from each folder, but can't get it to work. Could you please tell me why?
Thanks.

rd1 = read.table(file=list.files('fold1')[1], head=T)
rd2 = read.table(file=list.files('fold1')[2], head=T)

rt1 = read.table(file=list.files('fold2')[1], head=T)
rt2 = read.table(file=list.files('fold2')[2], head=T)

Then there are the warning sign that 'cannot open file 'file1.txt': No such
file or directory'

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Simon Blomberg
How about Cox and Reid (2000) The Theory of the Design of Experiments. 
It has S-PLUS code in the back, which should pretty much work with R.



On 08/11/16 22:24, Spencer Graves wrote:
  Have you considered Box and Draper (2007) Response Surfaces, 
Mixtures, and Ridge Analyses, 2nd Edition?



  You probably know that George Box invented the field of Response 
Surfaces with  Box, G. E. P. and Wilson, K.B. (1951) On the 
Experimental Attainment of Optimum Conditions (with discussion). 
Journal of the Royal Statistical Society Series B13(1):1–45.



  This book describes how to design experiments to get the data to 
optimize a physical process.  I haven't been teaching in academia for 
the past 25 years, but I taught an advanced course from the first 
edition of this book when I did.



  Still, any title "with R" sounds like it's worth reviewing and 
maybe using.



   Spencer Graves


On 11/8/2016 12:36 AM, Erin Hodgess wrote:

I like BH^2 as well as a reference book! I actually think I will go with
the DOE with R by Larson.  Thanks to all for the help!

Sincerely,
Erin


On Mon, Nov 7, 2016 at 10:59 PM, Bert Gunter  
wrote:



Have you looked here:

https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck%
3Aexperimental+design=2=experimental+design&
ie=UTF8=1478580868

I would think your choice depends strongly on the arena of application.

Of course I like BH^2, but that was because I was taught by them.

Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Nov 7, 2016 at 8:13 PM, Erin Hodgess 
wrote:

Hello!

Could someone recommend a good book on Design of Experiments for a

Master's

in Data Analytics, please?

I use Montgomery's book for my undergrad course, but was thinking 
about

something a little more advanced for this one.

Any help much appreciated, particularly with R-related texts.

Sincerely,
Erin


--
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

 [[alternative HTML version deleted]]

__
R-help@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.





__
R-help@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.


--
Simon Blomberg, BSc (Hons), PhD, MAppStat, AStat.
Senior Lecturer and Consultant Statistician
School of Biological Sciences
The University of Queensland
St. Lucia Queensland 4072
Australia
T: +61 7 3365 2506
email: S.Blomberg1_at_uq.edu.au
http://www.evolutionarystatistics.org

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

Basically, I'm not interested in doing research and
I never have been. I'm interested in understanding,
which is quite a different thing. And often to
understand something you have to work it out
for yourself because no one else has done it.
- David Blackwell

__
R-help@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.


Re: [R] Alternative to apply in base R

2016-11-08 Thread William Dunlap via R-help
The version which allows any number of columns does not take
much more time than the one that requires exactly 7 columns.
If you have a zillion columns then these are not so good.

> f1 <- function(x) x[,1]*x[,2]*x[,3]*x[,4]*x[,5]*x[,6]*x[,7]
> f2 <- function(x) {
+val <- rep(1, nrow(x))
+for(i in seq_len(ncol(x))) {
+   val <- val * x[,i]
+}
+val
+ }
> z <- matrix(runif(10e6 * 7), ncol=7)
> system.time(v1 <- f1(z))
   user  system elapsed
  0.686   0.140   0.826
> system.time(v2 <- f2(z))
   user  system elapsed
  0.663   0.196   0.860
> all.equal(v1,v2,tolerance=0)
[1] TRUE

You might speed up f2 a tad by special-casing the ncol==0,
ncol==1, and ncol>1 cases.

The versions that call prod() nrow(x) times take about 25 seconds
on this machine and dataset.



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Tue, Nov 8, 2016 at 1:58 PM, Doran, Harold  wrote:

> Well, I wish R-help had a “like” button as I would most certainly like
> this reply :)
>
> As usual, you’re right. I should have added a disclaimer that “in this
> instance” there are 7 columns as the function I wrote evaluates an
> N-dimensional integral and so as the dimensions change, so do the number
> of columns in this matrix (plus another factor). But the number of columns
> is never all that large.
>
>
>
> On 11/8/16, 4:37 PM, "peter dalgaard"  wrote:
>
> >
> >> On 08 Nov 2016, at 21:23 , Doran, Harold  wrote:
> >>
> >> It¹s a good suggestion. Multiplication in this case is over 7 columns in
> >> the data, but the number of rows is millions. Unfortunately, the values
> >> are negative as these are actually gauss-quad nodes used to evaluate a
> >> multidimensional integral.
> >
> >If there really are only 7 cols, then there's also the blindingly obvious
> >
> >mm[,1]*mm[,2]*mm[,3]*mm[,4]*mm[,5]*mm[,6]*mm[,7]
> >
> >-pd
> >
> >
> >>
> >> colSums is better than something like apply(dat, 2, sum); I was hoping
> >> there was something similar to colSums/rowSums using prod().
> >>
> >> On 11/8/16, 3:00 PM, "Fox, John"  wrote:
> >>
> >>> Dear Harold,
> >>>
> >>> If the actual data with which you're dealing are non-negative, you
> >>>could
> >>> log all the values, and use colSums() on the logs. That might also have
> >>> the advantage of greater numerical accuracy than multiplying millions
> >>>of
> >>> numbers. Depending on the numbers, the products may be too large or
> >>>small
> >>> to be represented. Of course, logs won't work with your toy example,
> >>> where rnorm() will generate values that are both negative and positive.
> >>>
> >>> I hope this helps,
> >>> John
> >>> -
> >>> John Fox, Professor
> >>> McMaster University
> >>> Hamilton, Ontario
> >>> Canada L8S 4M4
> >>> web: socserv.mcmaster.ca/jfox
> >>>
> >>>
> >>> 
> >>> From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold
> >>> [hdo...@air.org]
> >>> Sent: November 8, 2016 10:57 AM
> >>> To: r-help@r-project.org
> >>> Subject: [R] Alternative to apply in base R
> >>>
> >>> Without reaching out to another package in R, I wonder what the best
> >>>way
> >>> is to speed enhance the following toy example? Over the years I have
> >>> become very comfortable with the family of apply functions and
> >>>generally
> >>> not good at finding an improvement for speed.
> >>>
> >>> This toy example is small, but my real data has many millions of rows
> >>>and
> >>> the same operations is repeated many times and so finding a less
> >>> expensive alternative would be helpful.
> >>>
> >>> mm <- matrix(rnorm(100), ncol = 10)
> >>> rn <- apply(mm, 1, prod)
> >>>
> >>>   [[alternative HTML version deleted]]
> >>>
> >>> __
> >>> R-help@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.
> >>
> >> __
> >> R-help@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.
> >
> >--
> >Peter Dalgaard, Professor,
> >Center for Statistics, Copenhagen Business School
> >Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> >Phone: (+45)38153501
> >Office: A 4.23
> >Email: pd@cbs.dk  Priv: pda...@gmail.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> __
> R-help@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, 

Re: [R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
Well, I wish R-help had a “like” button as I would most certainly like
this reply :)

As usual, you’re right. I should have added a disclaimer that “in this
instance” there are 7 columns as the function I wrote evaluates an
N-dimensional integral and so as the dimensions change, so do the number
of columns in this matrix (plus another factor). But the number of columns
is never all that large.



On 11/8/16, 4:37 PM, "peter dalgaard"  wrote:

>
>> On 08 Nov 2016, at 21:23 , Doran, Harold  wrote:
>> 
>> It¹s a good suggestion. Multiplication in this case is over 7 columns in
>> the data, but the number of rows is millions. Unfortunately, the values
>> are negative as these are actually gauss-quad nodes used to evaluate a
>> multidimensional integral.
>
>If there really are only 7 cols, then there's also the blindingly obvious
>
>mm[,1]*mm[,2]*mm[,3]*mm[,4]*mm[,5]*mm[,6]*mm[,7]
>
>-pd
>
>
>> 
>> colSums is better than something like apply(dat, 2, sum); I was hoping
>> there was something similar to colSums/rowSums using prod().
>> 
>> On 11/8/16, 3:00 PM, "Fox, John"  wrote:
>> 
>>> Dear Harold,
>>> 
>>> If the actual data with which you're dealing are non-negative, you
>>>could
>>> log all the values, and use colSums() on the logs. That might also have
>>> the advantage of greater numerical accuracy than multiplying millions
>>>of
>>> numbers. Depending on the numbers, the products may be too large or
>>>small
>>> to be represented. Of course, logs won't work with your toy example,
>>> where rnorm() will generate values that are both negative and positive.
>>> 
>>> I hope this helps,
>>> John
>>> -
>>> John Fox, Professor
>>> McMaster University
>>> Hamilton, Ontario
>>> Canada L8S 4M4
>>> web: socserv.mcmaster.ca/jfox
>>> 
>>> 
>>> 
>>> From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold
>>> [hdo...@air.org]
>>> Sent: November 8, 2016 10:57 AM
>>> To: r-help@r-project.org
>>> Subject: [R] Alternative to apply in base R
>>> 
>>> Without reaching out to another package in R, I wonder what the best
>>>way
>>> is to speed enhance the following toy example? Over the years I have
>>> become very comfortable with the family of apply functions and
>>>generally
>>> not good at finding an improvement for speed.
>>> 
>>> This toy example is small, but my real data has many millions of rows
>>>and
>>> the same operations is repeated many times and so finding a less
>>> expensive alternative would be helpful.
>>> 
>>> mm <- matrix(rnorm(100), ncol = 10)
>>> rn <- apply(mm, 1, prod)
>>> 
>>>   [[alternative HTML version deleted]]
>>> 
>>> __
>>> R-help@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.
>> 
>> __
>> R-help@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.
>
>-- 
>Peter Dalgaard, Professor,
>Center for Statistics, Copenhagen Business School
>Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>Phone: (+45)38153501
>Office: A 4.23
>Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>

__
R-help@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.

Re: [R] Alternative to apply in base R

2016-11-08 Thread peter dalgaard

> On 08 Nov 2016, at 21:23 , Doran, Harold  wrote:
> 
> It¹s a good suggestion. Multiplication in this case is over 7 columns in
> the data, but the number of rows is millions. Unfortunately, the values
> are negative as these are actually gauss-quad nodes used to evaluate a
> multidimensional integral.

If there really are only 7 cols, then there's also the blindingly obvious

mm[,1]*mm[,2]*mm[,3]*mm[,4]*mm[,5]*mm[,6]*mm[,7]

-pd


> 
> colSums is better than something like apply(dat, 2, sum); I was hoping
> there was something similar to colSums/rowSums using prod().
> 
> On 11/8/16, 3:00 PM, "Fox, John"  wrote:
> 
>> Dear Harold,
>> 
>> If the actual data with which you're dealing are non-negative, you could
>> log all the values, and use colSums() on the logs. That might also have
>> the advantage of greater numerical accuracy than multiplying millions of
>> numbers. Depending on the numbers, the products may be too large or small
>> to be represented. Of course, logs won't work with your toy example,
>> where rnorm() will generate values that are both negative and positive.
>> 
>> I hope this helps,
>> John
>> -
>> John Fox, Professor
>> McMaster University
>> Hamilton, Ontario
>> Canada L8S 4M4
>> web: socserv.mcmaster.ca/jfox
>> 
>> 
>> 
>> From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold
>> [hdo...@air.org]
>> Sent: November 8, 2016 10:57 AM
>> To: r-help@r-project.org
>> Subject: [R] Alternative to apply in base R
>> 
>> Without reaching out to another package in R, I wonder what the best way
>> is to speed enhance the following toy example? Over the years I have
>> become very comfortable with the family of apply functions and generally
>> not good at finding an improvement for speed.
>> 
>> This toy example is small, but my real data has many millions of rows and
>> the same operations is repeated many times and so finding a less
>> expensive alternative would be helpful.
>> 
>> mm <- matrix(rnorm(100), ncol = 10)
>> rn <- apply(mm, 1, prod)
>> 
>>   [[alternative HTML version deleted]]
>> 
>> __
>> R-help@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.
> 
> __
> R-help@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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@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.


Re: [R] Alternative to apply in base R

2016-11-08 Thread Jeff Newmiller
Log-sum-antilog is faster than apply by several times, but vector 
multiplication in a for loop as David and Chuck have suggested is several times 
faster than that. 
-- 
Sent from my phone. Please excuse my brevity.

On November 8, 2016 12:23:04 PM PST, "Doran, Harold"  wrote:
>It¹s a good suggestion. Multiplication in this case is over 7 columns
>in
>the data, but the number of rows is millions. Unfortunately, the values
>are negative as these are actually gauss-quad nodes used to evaluate a
>multidimensional integral.
>
>colSums is better than something like apply(dat, 2, sum); I was hoping
>there was something similar to colSums/rowSums using prod().
>
>On 11/8/16, 3:00 PM, "Fox, John"  wrote:
>
>>Dear Harold,
>>
>>If the actual data with which you're dealing are non-negative, you
>could
>>log all the values, and use colSums() on the logs. That might also
>have
>>the advantage of greater numerical accuracy than multiplying millions
>of
>>numbers. Depending on the numbers, the products may be too large or
>small
>>to be represented. Of course, logs won't work with your toy example,
>>where rnorm() will generate values that are both negative and
>positive.
>>
>>I hope this helps,
>> John
>>-
>>John Fox, Professor
>>McMaster University
>>Hamilton, Ontario
>>Canada L8S 4M4
>>web: socserv.mcmaster.ca/jfox
>>
>>
>>
>>From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold
>>[hdo...@air.org]
>>Sent: November 8, 2016 10:57 AM
>>To: r-help@r-project.org
>>Subject: [R] Alternative to apply in base R
>>
>>Without reaching out to another package in R, I wonder what the best
>way
>>is to speed enhance the following toy example? Over the years I have
>>become very comfortable with the family of apply functions and
>generally
>>not good at finding an improvement for speed.
>>
>>This toy example is small, but my real data has many millions of rows
>and
>>the same operations is repeated many times and so finding a less
>>expensive alternative would be helpful.
>>
>>mm <- matrix(rnorm(100), ncol = 10)
>>rn <- apply(mm, 1, prod)
>>
>>[[alternative HTML version deleted]]
>>
>>__
>>R-help@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.
>
>__
>R-help@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.

__
R-help@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.

Re: [R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
It¹s a good suggestion. Multiplication in this case is over 7 columns in
the data, but the number of rows is millions. Unfortunately, the values
are negative as these are actually gauss-quad nodes used to evaluate a
multidimensional integral.

colSums is better than something like apply(dat, 2, sum); I was hoping
there was something similar to colSums/rowSums using prod().

On 11/8/16, 3:00 PM, "Fox, John"  wrote:

>Dear Harold,
>
>If the actual data with which you're dealing are non-negative, you could
>log all the values, and use colSums() on the logs. That might also have
>the advantage of greater numerical accuracy than multiplying millions of
>numbers. Depending on the numbers, the products may be too large or small
>to be represented. Of course, logs won't work with your toy example,
>where rnorm() will generate values that are both negative and positive.
>
>I hope this helps,
> John
>-
>John Fox, Professor
>McMaster University
>Hamilton, Ontario
>Canada L8S 4M4
>web: socserv.mcmaster.ca/jfox
>
>
>
>From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold
>[hdo...@air.org]
>Sent: November 8, 2016 10:57 AM
>To: r-help@r-project.org
>Subject: [R] Alternative to apply in base R
>
>Without reaching out to another package in R, I wonder what the best way
>is to speed enhance the following toy example? Over the years I have
>become very comfortable with the family of apply functions and generally
>not good at finding an improvement for speed.
>
>This toy example is small, but my real data has many millions of rows and
>the same operations is repeated many times and so finding a less
>expensive alternative would be helpful.
>
>mm <- matrix(rnorm(100), ncol = 10)
>rn <- apply(mm, 1, prod)
>
>[[alternative HTML version deleted]]
>
>__
>R-help@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.

__
R-help@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.


Re: [R] Alternative to apply in base R

2016-11-08 Thread Fox, John
Dear Harold,

If the actual data with which you're dealing are non-negative, you could log 
all the values, and use colSums() on the logs. That might also have the 
advantage of greater numerical accuracy than multiplying millions of numbers. 
Depending on the numbers, the products may be too large or small to be 
represented. Of course, logs won't work with your toy example, where rnorm() 
will generate values that are both negative and positive.

I hope this helps,
 John
-
John Fox, Professor
McMaster University
Hamilton, Ontario
Canada L8S 4M4
web: socserv.mcmaster.ca/jfox



From: R-help [r-help-boun...@r-project.org] on behalf of Doran, Harold 
[hdo...@air.org]
Sent: November 8, 2016 10:57 AM
To: r-help@r-project.org
Subject: [R] Alternative to apply in base R

Without reaching out to another package in R, I wonder what the best way is to 
speed enhance the following toy example? Over the years I have become very 
comfortable with the family of apply functions and generally not good at 
finding an improvement for speed.

This toy example is small, but my real data has many millions of rows and the 
same operations is repeated many times and so finding a less expensive 
alternative would be helpful.

mm <- matrix(rnorm(100), ncol = 10)
rn <- apply(mm, 1, prod)

[[alternative HTML version deleted]]

__
R-help@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.

__
R-help@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.


Re: [R] AdehabitatHR Write Spatial Polygon Problem

2016-11-08 Thread Duncan Murdoch

On 08/11/2016 12:09 PM, Shaney, Kyle J wrote:

Hi All,

I am trying to export a shapefile of a minimum convex polygon, but I receive 
the following error message:


Error: is(x, "SpatialPolygonsDataFrame") is not TRUE


I was able to successfully get my minimum convex polygon and plot it in R using 
the following code:


PID208 <- read.csv(file="PID208.csv", header = TRUE, sep = ",")

head(PID208)


 Name  X   YX1   Y2 sex ageReceive.Time
1 PID208 391734 6744220 -148.9906 60.81855   2   3 2015.06.18 21:12:20
2 PID208 391738 6744219 -148.9905 60.81855   2   3 2015.06.18 22:50:30
3 PID208 391739 6744229 -148.9905 60.81864   2   3 2015.06.04 20:41:52
4 PID208 391748 6744229 -148.9904 60.81864   2   3 2015.06.04 20:44:27
5 PID208 391748 6744229 -148.9904 60.81864   2   3 2015.06.04 20:44:27
6 PID208 391743 6744229 -148.9904 60.81864   2   3 2015.06.04 22:07:07?

xy<- SpatialPoints(PID208 [2:3])
mcp(xy, percent=95)
mcp(xy, percent=95)$area #to find actual area covered
plot(mcp(xy,percent=100))


Anybody know what I might be missing to successfully export the file for use in 
GIS?


You don't say how you're trying to export it, but you are creating a 
SpatialPoints object, and the error message says something wants a 
SpatialPolygonsDataFrame object.  So you need to convert it.


Duncan Murdoch

__
R-help@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.


Re: [R] [R-sig-Debian] proplems installing R 2.5 on Ubuntu 14.04

2016-11-08 Thread Lentes, Bernd via R-help


- Am 8. Nov 2016 um 16:22 schrieb Johannes Ranke johannes.ra...@jrwb.de:

> Hallo Bernd,
> 
> das heisst die gleiche Fehlermeldung bei "configure"?
> 
> Gruß,
> 
> Johannes
> 
> Am Dienstag, 8. November 2016, 15:45:15 schrieb Lentes, Bernd:
>> - Am 8. Nov 2016 um 15:26 schrieb Johannes Ranke johannes.ra...@jrwb.de:
>> > Hi
>> > 
>> > try
>> > 
>> > apt-get build-dep r-base
>> > 
>> > this installs the headers required for building current R, which probably
>> > also covers older versions - at least it will give you X11 headers.
>> > 
>> > Good luck,
>> > 
>> > Johannes
>> 
>> Hi Johannes,
>> 
>> i tried that and it didn't work.
>> 
>> Bernd
>> 
>> 

I installed a source package:
apt-get source r-base
Afterwards:
apt-get build-dep r-base

Then started ./configure again, but the same error appeared.

Bernd

 

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671

__
R-help@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.

[R] AdehabitatHR Write Spatial Polygon Problem

2016-11-08 Thread Shaney, Kyle J
Hi All,

I am trying to export a shapefile of a minimum convex polygon, but I receive 
the following error message:


Error: is(x, "SpatialPolygonsDataFrame") is not TRUE


I was able to successfully get my minimum convex polygon and plot it in R using 
the following code:


PID208 <- read.csv(file="PID208.csv", header = TRUE, sep = ",")

head(PID208)


Name  X   YX1   Y2 sex ageReceive.Time
1 PID208 391734 6744220 -148.9906 60.81855   2   3 2015.06.18 21:12:20
2 PID208 391738 6744219 -148.9905 60.81855   2   3 2015.06.18 22:50:30
3 PID208 391739 6744229 -148.9905 60.81864   2   3 2015.06.04 20:41:52
4 PID208 391748 6744229 -148.9904 60.81864   2   3 2015.06.04 20:44:27
5 PID208 391748 6744229 -148.9904 60.81864   2   3 2015.06.04 20:44:27
6 PID208 391743 6744229 -148.9904 60.81864   2   3 2015.06.04 22:07:07?

xy<- SpatialPoints(PID208 [2:3])
mcp(xy, percent=95)
mcp(xy, percent=95)$area #to find actual area covered
plot(mcp(xy,percent=100))


Anybody know what I might be missing to successfully export the file for use in 
GIS?

Thanks!

Kyle

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Duplicate row.names of lncRNA

2016-11-08 Thread Vivek Das
This is cross posted in Biostars https://www.biostars.org/p/221116/ . I do
not see any problem with duplicate row names unless you have specific
reasons to keep them. Here you are performing with transcript ids either
with refseq or ensemble. Now every gene does not have unique transcript
ids, they have alternative splicing events and more than one trascripts.
That is one main reason we perform gene summarisation. So you can go for a
gene level count matrix generation or expression value generation , then
this should be handled unless you want only transcript level output.

-- V.D

On Tue, Nov 8, 2016 at 6:01 PM, Elham - via R-help 
wrote:

> I want to do meta analysis for lncRNA,but there is this error : Duplicate
> row.names are not allowedso some genes that are duplicate were detected,for
> example:PGM5-AS1-001 ENST0417887.1PGM5-AS1-001 ENST0613309.4when I
> search them in ensembl by its Transcript ID, one of them is antisense and
> another is lincRNA, with different bp. why?for meta analysis,I should
> aggregate them as mean.is it true in this situation?
> [[alternative HTML version deleted]]
>
> __
> R-help@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]]

__
R-help@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.


[R] Duplicate row.names of lncRNA

2016-11-08 Thread Elham - via R-help
I want to do meta analysis for lncRNA,but there is this error : Duplicate 
row.names are not allowed. 
so 35 genes that are duplicate were detected,for example:
PGM5-AS1-001 ENST0417887.1      
PGM5-AS1-001 ENST0613309.4     
when I search them in ensembl by its Transcript ID, one of them is antisense 
and another is lincRNA, with different bp. why?
for meta analysis,I should aggregate them as mean.is it true in this situation?
is it possible to change name of them by add 1,2.. for example: PGM5-AS1-001.1 
and PGM5-AS1-001.2 ?
[[alternative HTML version deleted]]

__
R-help@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.

Re: [R] Unsupervised Clustering Algorithms(Possibilistic C-Means and Noisy Clustering)

2016-11-08 Thread Bert Gunter
Get familiar with the R ecosystem.

https://cran.r-project.org/web/views/Cluster.html

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Nov 8, 2016 at 5:45 AM, alper tuna kavlak
 wrote:
> Hi,
>
> I need some help about coding on clustering algorithms. To compose the
> structure of clusters I have already codes for K-Means and Fuzzy C-Means. I
> need also for PCM and NC but the problem that I can't write the proper code
> for those algorithms. So if there is a responsible person who is related
> about this topic it would be really nice to complete my code list for my
> thesis work. I am looking for your response about this.
>
> Best Regards
>
> Alper Tuna KAVLAK
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.

__
R-help@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.


[R] Duplicate row.names of lncRNA

2016-11-08 Thread Elham - via R-help
I want to do meta analysis for lncRNA,but there is this error : Duplicate 
row.names are not allowedso some genes that are duplicate were detected,for 
example:PGM5-AS1-001 ENST0417887.1PGM5-AS1-001 ENST0613309.4when I 
search them in ensembl by its Transcript ID, one of them is antisense and 
another is lincRNA, with different bp. why?for meta analysis,I should aggregate 
them as mean.is it true in this situation?
[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Alternative to apply in base R

2016-11-08 Thread David Winsemius

> On Nov 8, 2016, at 7:57 AM, Doran, Harold  wrote:
> 
> Without reaching out to another package in R, I wonder what the best way is 
> to speed enhance the following toy example? Over the years I have become very 
> comfortable with the family of apply functions and generally not good at 
> finding an improvement for speed.
> 
> This toy example is small, but my real data has many millions of rows and the 
> same operations is repeated many times and so finding a less expensive 
> alternative would be helpful.
> 
> mm <- matrix(rnorm(100), ncol = 10)
> rn <- apply(mm, 1, prod)

I believe you will find that a for-loop is faster.

library(microbenchmark)
help(pac=microbenchmark)
microbenchmark( forloop={ y = mm[,1]; for (i in 2:dim(mm)[2]) y=mm[,i]}, 
apply = apply(mm,2,prod) )

+--
Unit: microseconds
exprmin  lq mean  median  uq max neval cld
 forloop 10.735 11.6450 15.00425 13.1295 13.7455 115.600   100  a 
   apply 60.775 63.2025 71.95027 64.4530 71.3525 209.309   100   b



> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@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.

David Winsemius
Alameda, CA, USA

__
R-help@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.


Re: [R] Alternative to apply in base R

2016-11-08 Thread Charles C. Berry

On Tue, 8 Nov 2016, Doran, Harold wrote:


Without reaching out to another package in R, I wonder what the best way is to 
speed enhance the following toy example? Over the years I have become very 
comfortable with the family of apply functions and generally not good at 
finding an improvement for speed.

This toy example is small, but my real data has many millions of rows 
and the same operations is repeated many times and so finding a less 
expensive alternative would be helpful.


mm <- matrix(rnorm(100), ncol = 10)
rn <- apply(mm, 1, prod)



If the real example has only 10 columns, try this:


y <- mm[,1]
for (i in 2:10) y[] <- y*mm[,i]
all.equal(y,rn)


If it has many more columns, I would `reach out' to the inline package and 
write 3 lines of C or Fortran to do the operation.


HTH,

Chuck

__
R-help@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.


[R] Unsupervised Clustering Algorithms(Possibilistic C-Means and Noisy Clustering)

2016-11-08 Thread alper tuna kavlak
Hi,

I need some help about coding on clustering algorithms. To compose the
structure of clusters I have already codes for K-Means and Fuzzy C-Means. I
need also for PCM and NC but the problem that I can't write the proper code
for those algorithms. So if there is a responsible person who is related
about this topic it would be really nice to complete my code list for my
thesis work. I am looking for your response about this.

Best Regards

Alper Tuna KAVLAK

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Sorting of character vectors

2016-11-08 Thread Pascal A. Niklaus

Thanks for all suggestions.

With my build (from the CRAN repo) I don't get ICU support, and setting 
LC_COLLATE to "C" did not help.


> capabilities("ICU")
  ICU
FALSE

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

locale:
 [1] LC_CTYPE=en_DK.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_DK.UTF-8LC_COLLATE=C
 [5] LC_MONETARY=en_DK.UTF-8LC_MESSAGES=en_DK.UTF-8
 [7] LC_PAPER=en_DK.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.3.2 tools_3.3.2



However, using stringi::stri_sort did the trick !

__
R-help@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.


[R] Alternative to apply in base R

2016-11-08 Thread Doran, Harold
Without reaching out to another package in R, I wonder what the best way is to 
speed enhance the following toy example? Over the years I have become very 
comfortable with the family of apply functions and generally not good at 
finding an improvement for speed.

This toy example is small, but my real data has many millions of rows and the 
same operations is repeated many times and so finding a less expensive 
alternative would be helpful.

mm <- matrix(rnorm(100), ncol = 10)
rn <- apply(mm, 1, prod)

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-08 Thread Achim Zeileis

On Tue, 8 Nov 2016, danilo.car...@uniparthenope.it wrote:

I tried the function flexmix() with the driver FLXMRnegbin() with two 
components first, in order to compare its results with those provided by my 
function mixnbinom(). In particular, I ran the following code:




fm0 <- flexmix(y ~ 1, data = data.frame(y), k = 2, model = FLXMRnegbin())



where "y" is my vector of counts. The previous function provided me the 
following parameters:




  Comp.1   Comp.2
coef.(Intercept) 1.2746536 1.788578
theta0.1418201 5.028766



with priors 0.342874 and 0.657126, respectively. I assume that the 
coefficients "Intercept" represent the two means of the model (mu1 and mu2),


No, a log link is employed, i.e., exp(1.2746536) and exp(1.788578) are the 
means.



while the "theta" coefficients are the size parameters (size1 and size2).


Yes.

Unfortunately, unlike my function mixnbinom(), the model computed with 
flexmix() did not provide a good fit to my data (p-value ~0).


Is there something wrong in the process above?


Hard to say without a reproducible example. Using parameter values similar 
to the ones you cite above, the following seems to do a reasonable job:


## packages
library("countreg")
library("flexmix")

## artificial data from two NB distributions:
## 1/3 is NB(mu = 3.5, theta = 0.2) and
## 2/3 is NB(mu = 6.0, theta = 5.0)
set.seed(1)
y <- c(rnbinom(200, mu = 3.5, size = 0.2), rnbinom(400, mu = 6, size = 5))

## fit 2-component mixture model
set.seed(1)
fm <- flexmix(y ~ 1, k = 2, model = FLXMRnegbin())

## inspect estimated parameters -> look acceptable
parameters(fm)
exp(parameters(fm)[1,])

My experience was that finding good starting values may be a problem for 
flexmix(). So maybe setting these in some better way would be beneficial.



Achim Zeileis  ha scritto:


On Mon, 7 Nov 2016, danilo.car...@uniparthenope.it wrote:


I need a function for R software which computes a mixture of Negative
Binomial distributions with at least three components.


The package "countreg" on R-Forge provides a driver FLXMRnegbin() that can 
be combined with the "flexmix" package (i.e., functions flexmix() and 
stepFlexmix()). The manual page provides some worked illustrations in 
example("FLXMRnegbin", package = "countreg").


Note that the driver is mainly designed for negative binomial _regression_ 
models. But if you just regress on a constant (y ~ 1) you can also get 
negative binomial mixture distributions without covariates.



-
Danilo Carità

PhD Candidate
University of Naples "Parthenope"
Dipartimento di Studi Aziendali e Quantitativi
via G. Parisi, 13, 80132 Napoli - Italy
-


__
R-help@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.

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-08 Thread danilo . carita
I tried the function flexmix() with the driver FLXMRnegbin() with two  
components first, in order to compare its results with those provided  
by my function mixnbinom(). In particular, I ran the following code:




fm0 <- flexmix(y ~ 1, data = data.frame(y), k = 2, model = FLXMRnegbin())



where "y" is my vector of counts. The previous function provided me  
the following parameters:




   Comp.1   Comp.2
coef.(Intercept) 1.2746536 1.788578
theta0.1418201 5.028766



with priors 0.342874 and 0.657126, respectively. I assume that the  
coefficients "Intercept" represent the two means of the model (mu1 and  
mu2), while the "theta" coefficients are the size parameters (size1  
and size2).


Unfortunately, unlike my function mixnbinom(), the model computed with  
flexmix() did not provide a good fit to my data (p-value ~0).


Is there something wrong in the process above?



Achim Zeileis  ha scritto:


On Mon, 7 Nov 2016, danilo.car...@uniparthenope.it wrote:


I need a function for R software which computes a mixture of Negative
Binomial distributions with at least three components.


The package "countreg" on R-Forge provides a driver FLXMRnegbin()  
that can be combined with the "flexmix" package (i.e., functions  
flexmix() and stepFlexmix()). The manual page provides some worked  
illustrations in example("FLXMRnegbin", package = "countreg").


Note that the driver is mainly designed for negative binomial  
_regression_ models. But if you just regress on a constant (y ~ 1)  
you can also get negative binomial mixture distributions without  
covariates.



-
Danilo Carità

PhD Candidate
University of Naples "Parthenope"
Dipartimento di Studi Aziendali e Quantitativi
via G. Parisi, 13, 80132 Napoli - Italy

__
R-help@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.

Re: [R] problem installing R 2.5

2016-11-08 Thread peter dalgaard
Notice that it is pretty much mandatory to study the Admin manual, e.g.,

https://cran.r-project.org/doc/manuals/r-release/R-admin.html

and its appendices in particular. It is also included in the sources (in .texi 
format). As you are building an old R on a recent OS, some interpolation may be 
required.

-pd

On 08 Nov 2016, at 15:07 , Lentes, Bernd via R-help  
wrote:

> 
> 
>> Hi,
> 
>> I would like to suggest that this discussion be moved to R-SIG-Debian, since
>> this is Linux distribution specific:
> 
>> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
> 
>> You will avail yourself of a more focused audience there as well.
> 
>> Regards,
> 
>> Marc Schwartz
> 
> Ok. I subscribed to that ML and asked there. But if someone here has a 
> further idea
> i would appreciate it.
> 
> Thanks.
> 
> Bernd
> 
> 
> Helmholtz Zentrum Muenchen
> Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
> Ingolstaedter Landstr. 1
> 85764 Neuherberg
> www.helmholtz-muenchen.de
> Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
> Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen
> Registergericht: Amtsgericht Muenchen HRB 6466
> USt-IdNr: DE 129521671
> 
> __
> R-help@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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@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.


Re: [R] problem installing R 2.5

2016-11-08 Thread Marc Schwartz

> On Nov 8, 2016, at 7:08 AM, Lentes, Bernd via R-help  
> wrote:
> 
> 
> 
> - Am 8. Nov 2016 um 7:53 schrieb Göran Broström goran.brost...@umu.se:
> 
>> libX11-dev?
>> 
>> Göran
> 
> Hi,
> 
> is already installed:
> 
> i A libx11-dev  - Client-seitige Bibliothek für X11 
> (Entwick
> 
> (ubuntu system)
> 
> 
> Bernd


Hi,

I would like to suggest that this discussion be moved to R-SIG-Debian, since 
this is Linux distribution specific:

  https://stat.ethz.ch/mailman/listinfo/r-sig-debian 


You will avail yourself of a more focused audience there as well.

Regards,

Marc Schwartz


[[alternative HTML version deleted]]

__
R-help@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.

Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Richard M. Heiberger
It depends what "Data Analytics" means.  Is it more or less, or just a
synonym, for "Statistics"?  My book, "Statistical Analysis and Data
Display: An Intermediate Course with Examples in R" 2nd edition,
Springer 2015 could support about half of a Design of Experiments
course for MS in Statistics.  Use Chapters 6,7,12,13,14.

On Mon, Nov 7, 2016 at 11:13 PM, Erin Hodgess  wrote:
> Hello!
>
> Could someone recommend a good book on Design of Experiments for a Master's
> in Data Analytics, please?
>
> I use Montgomery's book for my undergrad course, but was thinking about
> something a little more advanced for this one.
>
> Any help much appreciated, particularly with R-related texts.
>
> Sincerely,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.

__
R-help@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.


Re: [R] problem installing R 2.5

2016-11-08 Thread Lentes, Bernd via R-help


> Hi,

> I would like to suggest that this discussion be moved to R-SIG-Debian, since
> this is Linux distribution specific:

> https://stat.ethz.ch/mailman/listinfo/r-sig-debian

> You will avail yourself of a more focused audience there as well.

> Regards,

> Marc Schwartz

Ok. I subscribed to that ML and asked there. But if someone here has a further 
idea
i would appreciate it.

Thanks.

Bernd
 

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671

__
R-help@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.


Re: [R] Sorting of character vectors

2016-11-08 Thread Rui Barradas

Hello,

What is your sessionInfo()?
With me it works as expected:

> sort(c("-", "+"))
[1] "-" "+"
> sort(c("+", "-"))
[1] "-" "+"
> x5 <- c("+Aa","-Ab")
> sort(x5)
[1] "-Ab" "+Aa"

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 
LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C 


[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

Hope this helps,

Rui Barradas


Em 08-11-2016 12:18, Pascal A. Niklaus escreveu:

I just got caught by the way in character vectors are sorted.

It seems that on my machine "sort" (and related functions like "order")
only consider characters related to punctuation (at least here the "+"
and "-") when there is no difference in the remaining characters:

 > x1 <- c("-A","+A")
 > x2 <- c("+A","-A")
 > sort(x1)# sorting is according to "-" and "+"
[1] "-A" "+A"
 > sort(x2)
[1] "-A" "+A"

 > x3 <- c("-Aa","-Ab")
 > x4 <- c("-Aa","+Ab")
 > x5 <- c("+Aa","-Ab")
 > sort(x3)
[1] "-Aa" "-Ab" # here the "+" and "-" are ignored
 > sort(x4)
[1] "-Aa" "+Ab"
 > sort(x5)
[1] "+Aa" "-Ab"

I understand from the help that this depends on how characters are
collated, and that this scheme follows the multi-level comparison in
unicode (http://www.unicode.org/reports/tr10/).

However, what I need is a strict left-to-right comparison of the sort
provided by strcmp or wcscmp in glibc. The particular ordering of
special characters is not so important, but there should be no
"multi-level" aspect to the sorting.

Is there a way to achieve this in R?

Thanks for your help

Pascal

__
R-help@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.


__
R-help@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.


Re: [R] Sorting of character vectors

2016-11-08 Thread peter dalgaard

On 08 Nov 2016, at 13:18 , Pascal A. Niklaus  wrote:

> I just got caught by the way in character vectors are sorted.
> 
> It seems that on my machine "sort" (and related functions like "order") only 
> consider characters related to punctuation (at least here the "+" and "-") 
> when there is no difference in the remaining characters:
> 
> > x1 <- c("-A","+A")
> > x2 <- c("+A","-A")
> > sort(x1)# sorting is according to "-" and "+"
> [1] "-A" "+A"
> > sort(x2)
> [1] "-A" "+A"
> 
> > x3 <- c("-Aa","-Ab")
> > x4 <- c("-Aa","+Ab")
> > x5 <- c("+Aa","-Ab")
> > sort(x3)
> [1] "-Aa" "-Ab" # here the "+" and "-" are ignored
> > sort(x4)
> [1] "-Aa" "+Ab"
> > sort(x5)
> [1] "+Aa" "-Ab"
> 
> I understand from the help that this depends on how characters are collated, 
> and that this scheme follows the multi-level comparison in unicode 
> (http://www.unicode.org/reports/tr10/).
> 
> However, what I need is a strict left-to-right comparison of the sort 
> provided by strcmp or wcscmp in glibc. The particular ordering of special 
> characters is not so important, but there should be no "multi-level" aspect 
> to the sorting.
> 
> Is there a way to achieve this in R?
> 

I'd try one of two ways (the above is not happening for me, so I cannot test):

(1) Temporarily set the Locale to "C": Sys.setlocale("LC_COLLATE", "C"). That 
should work as long as you stay in good ol' ASCII.
(2) Figure out (Don't look at me!) how to diddle the ICU settings for your 
system, icuSetCollate() is claimed to be your friend.

-pd


> Thanks for your help
> 
> Pascal
> 
> __
> R-help@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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@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.


Re: [R] Help-Text file

2016-11-08 Thread Priya Arasu
 Hi, 
 I have taken Mr.Jeff's suggestions in producing a reproducible example and 
edited my question again. Kindly someone in the mailing list, help to solve the 
problem, which I have mentioned in the below mail
Thank youPriya

 
 Dear Mr. Jeff Newmiller, 
                    Thank you. I have gone through the 
links that you have sent me to produce reproducible example. I will try to 
explain the problem clearly this time. 

I have been using Boolnet package, to simulate interaction between certain 
genes. I have a problem after importing the text file (New_Text_Document_1)  in 
R and start doing the attractor analysis in Boolnet. I have pasted the steps 
below, when I give the command "getAttractors" for doing attractor analysis, I 
get the error (highlighted red and italicized).

> library("BoolNet", lib.loc="~/R/win-library/3.3")
> library(readr)#Imported txt file
> New_Text_Document_1 <- read_csv("C:/Users/Priya/Desktop/New Text 
> Document-1.txt") 
Parsed with column specification:
cols(
  Targets = col_character(),
  factors = col_character()
)
> View(New_Text_Document_1)
> net <- loadNetwork("C:/Users/Priya/Desktop/New Text Document-1.txt") #loaded 
> the txt file as network (net) for analysis
> attr <- getAttractors(net, type="asynchronous") # attractor analysis for the 
> txt file
Error in matrix(nrow = n, ncol = length(network$genes)) : 
  invalid 'nrow' value (too large or NA)
In addition: Warning message:
In matrix(nrow = n, ncol = length(network$genes)) :
  NAs introduced by coercion to integer range


Using dput, I have pasted the data (New_Text_Document_1), which I 
have imported for doing attractor analysis.I have also attached the 
New_Text_Document_1 along with this mail. I didn't get any reply from the 
publishers of Boolnet package, so Kindly help. Have anyone come across this 
error and how do I fix this problem? 


dput(New_Text_Document_1)
New_Text_Document_1 <- structure(list(Targets = c("DISC1", "MITF", "GATA1", 
"TAL1", "EZH2", "AR", "TCF3", "miR124", "miR377", "let7b", "let7a", "let7d", 
"PCM1", "miR33a", "EGR1", "SALL4", "POU3F2", "THAP11", "HCFC1","ZFP281", "WT1", 
"SOX2", "CUX1", "SIN3B", "KDM5B", "HOXB4", "ELK1", "FLI1", "HNF4A", "RUNX1", 
"BBS4", "miR432", "miR382", "miR127", "E2F1", "TFAP2A", "EOMES", "GABP"), 
factors = c("(!miR124 & !let7b & !let7a & !let7d) | (PCM1 & BBS4) | (MITF | 
GATA1 | TAL1 | EZH2 | AR | TCF3 | HNF4A | RUNX1)", 
"(MITF)", "(GATA1)", "(!miR377) | (TAL1)", "(!miR124) | (EZH2)", 
"(!miR124) | (AR)", "(!miR124) | (TCF3)", "(EGR1)", "(miR377)", 
"(let7b)", "(let7a)", "(let7d)", "(! miR33a) | (DISC1 & BBS4) | (EGR1 | SALL4 | 
POU3F2 | THAP11 | HCFC1 | ZFP281 | WT1 | SOX2 | CUX1 | SIN3B | KDM5B | HOXB4 | 
ELK1 | TCF3 | FLI1 | HNF4A | RUNX1 | MITF)", "(miR33a)", "(! miR124) | (EGR1)", 
"(SALL4)", "(POU3F2)", "(THAP11)","(HCFC1)", "(ZFP281)", "(WT1)", "(SOX2)", 
"(CUX1)", "(SIN3B)",
"(KDM5B)", "(HOXB4)", "(ELK1)", "(FLI1)", "(HNF4A)", "(RUNX1)", 
"(! miR432 & ! miR382 & ! miR127 & ! miR377) | (DISC1 & PCM1) | (E2F1 | GATA1 | 
FLI1 | MITF | ELK1 | CUX1 | KDM5B | SIN3B) | GABP | EOMES | TFAP2A)", 
"(miR432)", "(miR382)", "(miR127)", "(! let7a) | (E2F1)", "(TFAP2A)", 
"(EOMES)", "(GABP)")), 
class = c("tbl_df", "tbl", "data.frame"), 
row.names = c(NA, -38L), .
Names = c("Targets", "factors"), 
spec = structure(list(cols = structure(list(Targets = structure(list(), class = 
c("collector_character","collector")), 
factors = structure(list(), class = c("collector_character", "collector"))), .
Names = c("Targets", "factors")), 
default = structure(list(),
class = c("collector_guess", "collector"))), .
Names = c("cols", "default"), class = "col_spec"))

Regards
Priya
 
 

On Saturday, 5 November 2016 10:28 PM, Jeff Newmiller 
 wrote:
 

 Sorry, but this request is quite hard to understand... you are basically 
directing your question at an incredibly narrow set of people who happen to 
have combined your kind of data read in the way you read it in with your kind 
of analysis algorithms while telling us almost nothing about how you did those 
things.

Please read the Posting Guide mentioned in the footer of every posting on this 
list and provide a reproducible example [1][2]. If the problem is in your use 
of R then someone here will be able to help. If your problem is inside a 
contributed package then you may need the assistance of the package maintainer, 
but they will also need a reproducible example so your effort will not be in 
vain. Also, the act of creating a RE often leads you to your own solution even 
without getting outside help. 

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

-- 
Sent from my phone. Please excuse my brevity.

On November 4, 2016 10:28:48 PM PDT, Priya Arasu via R-help 
 wrote:
>Hi, 
> I am using R 3.3.1 in R studio version 1.0.44 (Windows10, 64 bit
>system). 

[R] Sorting of character vectors

2016-11-08 Thread Pascal A. Niklaus

I just got caught by the way in character vectors are sorted.

It seems that on my machine "sort" (and related functions like "order") 
only consider characters related to punctuation (at least here the "+" 
and "-") when there is no difference in the remaining characters:


> x1 <- c("-A","+A")
> x2 <- c("+A","-A")
> sort(x1)# sorting is according to "-" and "+"
[1] "-A" "+A"
> sort(x2)
[1] "-A" "+A"

> x3 <- c("-Aa","-Ab")
> x4 <- c("-Aa","+Ab")
> x5 <- c("+Aa","-Ab")
> sort(x3)
[1] "-Aa" "-Ab" # here the "+" and "-" are ignored
> sort(x4)
[1] "-Aa" "+Ab"
> sort(x5)
[1] "+Aa" "-Ab"

I understand from the help that this depends on how characters are 
collated, and that this scheme follows the multi-level comparison in 
unicode (http://www.unicode.org/reports/tr10/).


However, what I need is a strict left-to-right comparison of the sort 
provided by strcmp or wcscmp in glibc. The particular ordering of 
special characters is not so important, but there should be no 
"multi-level" aspect to the sorting.


Is there a way to achieve this in R?

Thanks for your help

Pascal

__
R-help@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.


Re: [R] problem installing R 2.5

2016-11-08 Thread Lentes, Bernd via R-help


- Am 8. Nov 2016 um 7:53 schrieb Göran Broström goran.brost...@umu.se:

> libX11-dev?
> 
> Göran

Hi,

is already installed:

i A libx11-dev  - Client-seitige Bibliothek für X11 (Entwick

(ubuntu system)


Bernd
 

Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671

__
R-help@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.

Re: [R] a book recommendation, please [O/T]

2016-11-08 Thread Spencer Graves
  Have you considered Box and Draper (2007) Response Surfaces, 
Mixtures, and Ridge Analyses, 2nd Edition?



  You probably know that George Box invented the field of Response 
Surfaces with  Box, G. E. P. and Wilson, K.B. (1951) On the Experimental 
Attainment of Optimum Conditions (with discussion). Journal of the Royal 
Statistical Society Series B13(1):1–45.



  This book describes how to design experiments to get the data to 
optimize a physical process.  I haven't been teaching in academia for 
the past 25 years, but I taught an advanced course from the first 
edition of this book when I did.



  Still, any title "with R" sounds like it's worth reviewing and 
maybe using.



   Spencer Graves


On 11/8/2016 12:36 AM, Erin Hodgess wrote:

I like BH^2 as well as a reference book!  I actually think I will go with
the DOE with R by Larson.  Thanks to all for the help!

Sincerely,
Erin


On Mon, Nov 7, 2016 at 10:59 PM, Bert Gunter  wrote:


Have you looked here:

https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck%
3Aexperimental+design=2=experimental+design&
ie=UTF8=1478580868

I would think your choice depends strongly on the arena of application.

Of course I like BH^2, but that was because I was taught by them.

Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Nov 7, 2016 at 8:13 PM, Erin Hodgess 
wrote:

Hello!

Could someone recommend a good book on Design of Experiments for a

Master's

in Data Analytics, please?

I use Montgomery's book for my undergrad course, but was thinking about
something a little more advanced for this one.

Any help much appreciated, particularly with R-related texts.

Sincerely,
Erin


--
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

 [[alternative HTML version deleted]]

__
R-help@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.





__
R-help@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.


[R] drm function in drc package for fitting dose response curve

2016-11-08 Thread li li
Hi all,
  When using drm function in drc package, we can fit several does response
curves simultaneously or fitting each curve separately. If we fit
simultaneous curves without any constraining condition, for example,
parallelism condition, will we get the same results as the results obtained
by fitting separate curves, particularly parameter estimates?
If the results are different, what is the root differences, underlying
model and so on?
Thanks much.
   Hanna

[[alternative HTML version deleted]]

__
R-help@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.