Re: [R] ASExtras library

2018-07-04 Thread radmuzom .
The package appears to be referenced in the package "agridat" - ftp://cran.r-project.org/pub/R/web/packages/agridat/agridat.pdf (Pg 55). However, even I tried searching for it and there seems to be no reference other than this source. Regards, radmuzom From: R-help on behalf of David Winsemiu

Re: [R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Rolf Turner
On 05/07/18 10:21, Nelly Reduan wrote: Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20,

Re: [R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Jeff Newmiller
This looks like homework (which is off topic here per the Posting Guide). Also, please send your emails in plain text format to avoid us seeing your message differently than you do. On July 4, 2018 3:21:34 PM PDT, Nelly Reduan wrote: >Dear all, > >I would like to generate N random numbers with

[R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Nelly Reduan
Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20, replace=TRUE, prob=rep(0.28, times=length(se

Re: [R] gamlss() vs glm() standard errors via summary() vs vcov()

2018-07-04 Thread 1/k^c
Thank you, Peter! Sincerely, KeithC. On Wed, Jul 4, 2018 at 4:11 AM, Peter Dalgaard wrote: >> # Extract SEs via vcov() >> SEvcov1<-exp(coef(fit1)) *sqrt(diag(vcov(fit1))) >> SEvcov2<-exp(coef(fit2))*sqrt(diag(vcov(fit2))) > > What makes you think that you need to multiply with exp(coef()) he

Re: [R] R is creating a new level which is emty after importing a SAS file

2018-07-04 Thread peter dalgaard
It is not obvious that this is an error. If your nominal variable in SAS has a level which is not present in data, then R might just be making a faithful translation. There is a distinction between (a) having a gender variable with two levels of which 0 females and (b) pretending that male is th

[R] R is creating a new level which is emty after importing a SAS file

2018-07-04 Thread Adam Z. Jabir
Hi, I have imported some sasdata into R using the sas7bdat package. I have some nominal variables with some missing values. R is creating a new level which is emty ��.When I ask for tabulate this new level is presented with 0 as a frequency. I want to get rid of this level and have my file imp

Re: [R] prod(NaN, NA) vs. prod(NA, NaN)

2018-07-04 Thread Ted Harding
I've been following this thread, and wondering where it might lead. My (possibly naive) view of these matters is basically logical, relying on (possibly over-simplified) interpretaions of "NA" and "NaN". These are that: "NaN" means "Not a Number", though it can result from a numerical calculatio

Re: [R] ASExtras library

2018-07-04 Thread David Winsemius
> On Jul 3, 2018, at 6:34 PM, Mehrshad Barary wrote: > > Hi Everyone, > > Does anybody know how I can get ASExtras library? It would be helpful if you would provide information about your reasons for assuming this package's existence. Cannot find it in CRAN (including a search for 'ASExtra'

Re: [R] prod(NaN, NA) vs. prod(NA, NaN)

2018-07-04 Thread Barry Rowlingson
I'm having deja-vu of a similar discussion on R-devel: https://stat.ethz.ch/pipermail/r-devel/2018-July/076377.html This was the funniest inconsistency I could find: > sum(c(NaN,NA)) [1] NaN > sum(NaN,NA) [1] NA THEY'RE IN THE SAME ORDER!!! The doc in ?NaN has this clause: In R, basi

Re: [R] gamlss() vs glm() standard errors via summary() vs vcov()

2018-07-04 Thread Peter Dalgaard
> # Extract SEs via vcov() > SEvcov1<-exp(coef(fit1)) *sqrt(diag(vcov(fit1))) > SEvcov2<-exp(coef(fit2))*sqrt(diag(vcov(fit2))) What makes you think that you need to multiply with exp(coef()) here??? -pd > On 4 Jul 2018, at 11:08 , 1/k^c wrote: > > Hi R-helpers, > > I was working with som

[R] gamlss() vs glm() standard errors via summary() vs vcov()

2018-07-04 Thread 1/k^c
Hi R-helpers, I was working with some count data using gamlss() and glm(), and noticed that the standard errors from the two functions correspond when extracting from either the model summary for both functions, or using vcov for both functions, but the standard errors between those methods do not