distribution

R: unexpected behavior of the fdwm() function (evmix package)

青春壹個敷衍的年華 提交于 2020-01-25 20:40:53
问题 I am trying to fit a dynamic mixture model (Weibull for the bulk, Pareto for the tail) using the fdwm() function from the evmix package: library(repmis) library(evmix) data=source_data("https://www.dropbox.com/s/r7i0ctl1czy481d/test.csv?dl=0")[,1] test=fdwm(data,c(0.9150062,75.4699181,quantile(data,0.98),11.21,87.41,0.05)) I am experiencing a weird behavior: the function first returns an error...: Error in integrate(rx, wshape, wscale, cmu = cmu, ctau = ctau, sigmau = sigmau, : non-finite

iOS wireless ad hoc distribution fails at the end of download with “Unable to download…” message

半腔热情 提交于 2020-01-25 19:21:26
问题 iOS wireless ad hoc distribution fails at the end of download with "Unable to download..." message. I followed steps in the answer of here: iOS 4: wireless app distribution for in-house applications . Any workaround? 回答1: I got solution. I did not downloaded Provisioning Profile . A new device should download proper Provisioning Profile before downloading the app. 来源: https://stackoverflow.com/questions/3682279/ios-wireless-ad-hoc-distribution-fails-at-the-end-of-download-with-unable-to-do

One iPhone app with different template based on the URL it was downloaded from

拜拜、爱过 提交于 2020-01-25 05:40:24
问题 I want to give my iPhone app to different distributors for distribution. When a user will download the app from one of the distributors and open it the app should connect to our servers and ask for the unique settings of this distributer. The question is, how each app can "tell" from which distributer it was downloaded from? I don't want to compile a different application for each client. 回答1: I did some research into this and the only way I found to do it is just to create different targets

dlnorm in stat_function does not fit properly

蹲街弑〆低调 提交于 2020-01-24 17:21:06
问题 I am trying to superimpose a function via stat_function() in ggplot2 as described here: Superimposing a log-normal density in ggplot and stat_function() so using the command: ggplot(data=data, aes(x=x)) + geom_histogram(aes(y = ..density..)) + stat_function(fun = dlnorm, size=1, color='gray') + theme_bw() It works with the provided example where the data to fit to is generated with rf . However if I try to apply it to the dataset below, it does not fit. What is wrong with my data set for stat

Where to define distribution function to be used with fitdist (fitdistrplus) or fitdistr (MASS)?

本小妞迷上赌 提交于 2020-01-23 08:05:45
问题 I want to define my own distribution functions to be used with fitdist or fitdistr function in R. Using fitdist in the fitdistrplus package as an example. I define a customized distribution called sgamma as follows: dsgamma<-function(x,shape){return(dgamma(x,shape,scale=1));} qsgamma<-function(p,shape){return(qgamma(p,shape,scale=1));} psgamma<-function(q,shape){return(pgamma(q,shape,scale=1));} rsgamma<-function(n,shape){return(rgamma(n,shape,scale=1));} My question is where I should define

Where to define distribution function to be used with fitdist (fitdistrplus) or fitdistr (MASS)?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-23 08:05:15
问题 I want to define my own distribution functions to be used with fitdist or fitdistr function in R. Using fitdist in the fitdistrplus package as an example. I define a customized distribution called sgamma as follows: dsgamma<-function(x,shape){return(dgamma(x,shape,scale=1));} qsgamma<-function(p,shape){return(qgamma(p,shape,scale=1));} psgamma<-function(q,shape){return(pgamma(q,shape,scale=1));} rsgamma<-function(n,shape){return(rgamma(n,shape,scale=1));} My question is where I should define

Randomly selecting values from a zero inflated distribution in R

大城市里の小女人 提交于 2020-01-16 03:52:08
问题 Hello and thanks in advance for the help! A while back I asked a question about randomly selecting values according to a probability distribution. This is related, but I think it deserves its own post. The vector I created in the last question was binary, now I would like to generate a weighted vector (ie with bounded integers). I am sampling from a zero-inflated or quasi-poisson distribution with a long tail, so there is a much higher probability of selecting a zero than another value, but

Randomly selecting values from a zero inflated distribution in R

佐手、 提交于 2020-01-16 03:52:07
问题 Hello and thanks in advance for the help! A while back I asked a question about randomly selecting values according to a probability distribution. This is related, but I think it deserves its own post. The vector I created in the last question was binary, now I would like to generate a weighted vector (ie with bounded integers). I am sampling from a zero-inflated or quasi-poisson distribution with a long tail, so there is a much higher probability of selecting a zero than another value, but

R Standardized Precipitation Index .nc file

蹲街弑〆低调 提交于 2020-01-13 05:59:10
问题 I'm trying to calculate the SPI from CHIRPS monthly mean precipitation data, because it's too large I cut it down to my area of interest and here it is: https://www.dropbox.com/s/jpwcg8j5bdc5gq6/chirps_mensual_v1.nc?dl=0 I did this to open it: require(utils) require(colorRamps) require(RNetCDF) require(rasterVis) require(rgdal) library(ncdf4) library(raster) datos2 <- nc_open("Datos/chirps_mensual_v1.nc") ppt_array <- ncvar_get(datos2, "precip") #I'm only taking complete years so I took out

Fitting a normal distribution in R

社会主义新天地 提交于 2020-01-11 04:42:08
问题 I'm using the following code to fit the normal distribution. The link for the dataset for "b" (too large to post directly) is : link for b setwd("xxxxxx") library(fitdistrplus) require(MASS) tazur <-read.csv("b", header= TRUE, sep=",") claims<-tazur$b a<-log(claims) plot(hist(a)) After plotting the histogram, it seems a normal distribution should fit well. f1n <- fitdistr(claims,"normal") summary(f1n) #Length Class Mode #estimate 2 -none- numeric #sd 2 -none- numeric #vcov 4 -none- numeric #n