Agnes Ayang
2012-Dec-25 16:13 UTC
[R] Sampling data without having infinite numbers after diong a transformation
Hello R-helpers.. I want to ask about how I can sample data sets without having the infinite numbers coming out. For example, set.seed(1234) a<-rnorm(15,0,1) b<-rnorm(15,0,1) c<-rnorm(15,0,1) d<-rnorm(15,0,36) After come out with the sample, I need to do a transformation (by Hoaglin, 1985) for each data set. Actually I need to measure the skewness and kurtosis, that's why I need to do the transformation. After transformation, there will be 'Inf' value in my data sets and I cannot proceed with the next step where I need to compute the trimmed mean and sum square of deviation. If anyone can help on how to obtain a better data sets so that my programme will work. Thank you. Best regards, Hyo Min UPM Malaysia [[alternative HTML version deleted]]
Jeff Newmiller
2012-Dec-25 16:58 UTC
[R] Sampling data without having infinite numbers after diong a transformation
Perhaps you should read the help file for rnorm more carefully. ?rnorm Keep in mind that the normal probability distribution is a density function, so the smaller the standard deviation is, the greater the magnitude of the density function is. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Agnes Ayang <agnes.ayang at yahoo.com> wrote:>Hello R-helpers.. > >I want to ask about how I can sample data sets without having the >infinite numbers coming out. For example, > >set.seed(1234) > >a<-rnorm(15,0,1) >b<-rnorm(15,0,1) >c<-rnorm(15,0,1) >d<-rnorm(15,0,36) > >After come out with the sample, I need to do a transformation (by >Hoaglin, 1985) for each data set. Actually I need to measure the >skewness and kurtosis, that's why I need to do the transformation. >After transformation, there will be 'Inf' value in my data sets and I >cannot proceed with the next step where I need to compute the trimmed >mean and sum square of deviation. > >If anyone can help on how to obtain a better data sets so that my >programme will work. Thank you. > >Best regards, >Hyo Min >UPM Malaysia > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.