Displaying 4 results from an estimated 4 matches for "lambdahat".
2017 Dec 07
1
Seeking help with code
...ize n, bootstrap size B
n = 10
b = 8000
set a vector of days of rain into "drain"
drain = c(26.64, 30.65, 31.27, 33.04, 32.56, 29.10, 28.96, 26.44, 27.76, 32.27)
#calculate mean of the sample for days of rain
mdr=mean(drain)
mdr
#calculate the parameter of the exponential distribution
lambdahat = 1.0/mdr
lambdahat
#draw the bootstrap sample from Exponential
x = rexp(n*b, lambdahat)
x
bootstrapsample = matrix(x, nrow=n, ncol=b)
bootstrapsample
# Compute the bootstrap lambdastar
lambdastar = 1.0/colMeans(bootstrapsample)
lambdastar
# Compute the differences
deltastar = lambdastar - lamb...
2010 Sep 07
1
boundary correction - univariate kernel density estimation
Hey,
Does anyone know of a package in R that provides univariate kernel
density estimation with boundary correction ?
or how to easily extend an existing bivariate kernel density estimation
function (e.g. lambdahat in the spatialkernel package) with boundary
corrections to allow univariate density estimation?
Thanks a lot,
Steve B.
--
View this message in context: http://r.789695.n4.nabble.com/boundary-correction-univariate-kernel-density-estimation-tp2529963p2529963.html
Sent from the R help mailing lis...
2013 Mar 31
0
Standard error of normalmixEM fit?
...om/?file_id=09285782882980618119
My code:
normalmix<-normalmixEM(dat,k=2,lambda=c(0.99024,(1-0.99024)),fast=FALSE,maxit=10000,epsilon
= 1e-16,maxrestarts=1000)
normalmix$loglik
normalmix$lambda
se<-boot.se(normalmix,B=1000)
se$lambda.se
se$mu.se
se$sigma.se
final results:
lambdahat = 0.990238663
mu1hat= -0.00115
mu2hat= 0.040176949
sigma1hat= 0.012220305
sigma2hat= 0.003247102
My problem now is - and thats why I feel uncomfortable about relying on the
values - that the output of boot.se(normalmix) varies quite strong. So
without changing the code and rerun it (with the...
2013 Apr 04
0
Std. error of normalmixEM with boot.se
...om/?file_id=09285782882980618119
My code:
normalmix<-normalmixEM(dat,k=2,lambda=c(0.99024,(1-0.99024)),fast=FALSE,maxit=10000,epsilon
= 1e-16,maxrestarts=1000)
normalmix$loglik
normalmix$lambda
se<-boot.se(normalmix,B=1000)
se$lambda.se
se$mu.se
se$sigma.se
final results:
lambdahat = 0.990238663
mu1hat= -0.00115
mu2hat= 0.040176949
sigma1hat= 0.012220305
sigma2hat= 0.003247102
My problem now is - and thats why I feel uncomfortable about relying on the
values - that the output of boot.se(normalmix) varies quite strong. So
without changing the code and rerun it (with the...