Displaying 7 results from an estimated 7 matches for "muhat".
Did you mean:
muha
2008 Oct 05
1
Sample mean in R
I am having issues with the following:
(muhat = 1/n^2(sum of all the xi's) )
essentially if xbar = the sample mean, muhat = sample mean but square the n.
Question:
Use R to run a Monte Carlo simulation which compares the finite-sample
performance of xbar and muhat. Specifically generate 1000 samples n=30 from
a standard normal distribu...
2008 May 02
0
Adaptive design code
...value for the final test statistic
# theta is theta from Schafer Muller 2001
result<-rep(0,num.sim)
final.size<-rep(0,num.sim)
final.t<-rep(0,num.sim)
final.stat<-rep(0,num.sim)
z<-rep(0,num.sim)
# k1 is the number of expected events at the end of the trial under current design
# muhat is the median survival in the combined sample under alternative hypothesis for PARTNER
muhat<- (-12*log(2)/log(1-p.a)-12*log(2)/log(1-p.0))/2
n<- n.0 + n.a
k1<- (n/t.A)*( exp(-0.69*t.end/muhat) + 0.69*t.A/muhat - exp(-0.69*(t.end-t.A)/muhat) )/(0.69/muhat)
# start the simulation
for (i in...
2011 Sep 02
5
Hessian Matrix Issue
...-1)*(d-1))/mu),0)
#aa[j]<-log(1+((j-1)*(d-1))/mu)
#print(aa[j])
}
a[i]<-sum(aa)
#print(a[i])
}
a
arg3<-sum(a)
llh<-arg1+arg2+arg3
if(! is.finite(llh))
llh<-1e+20
-llh
}
ac<-optim(NegBin,par=c(xbar,dbar),method="L-BFGS-B",hessian=TRUE,lower=
c(0,1) )
ac
print(ac$hessian)
muhat<-ac$par[1]
dhat<-ac$par[2]
zhat<- 1+(log(dhat)/(1-dhat))
infor<-solve(ac$hessian)
var.dhat<-infor[2,2]
se.dhat<-sqrt(var.dhat)
var.muhat<-infor[1,1]
se.muhat<-sqrt(var.muhat)
var.func<-dhat*muhat
var.func
d.prime<-cbind(dhat,muhat)
se.var.func<-d.prime%*%infor%*%t(...
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and
sigma from N iid draws of N(mu, sigma^2):
tStat <- abs(x - muhat) / sigmahat
pValue <- pt(tStat, df=N, lower=TRUE)
I'm not quite sure what df tStat should have (exercise for math stat), but
given fairly large N, that should make little difference.
An...
2002 Aug 29
8
lme() with known level-one variances
Greetings,
I have a meta-analysis problem in which I have fixed effects
regression coefficients (and estimated standard errors) from identical
models fit to different data sets. I would like to use these results
to create pooled estimated regression coefficients and estimated
standard errors for these pooled coefficients. In particular, I would
like to estimate the model
\beta_{i} = \mu +
2008 Oct 21
2
Question about glm using R
Good morning,
I am using R to try to model the proportion of burned area in Portugal.
The dependent variable is the proportion. The family used is binomial
and the epsilon would be binary.
I am not able to find the package to be used when the proportion (%) has
to be used in glm. Could someone help me?
I am using normal commands of glm.. for example:
glm_5<- glm(formula=p~Precipitation,
2008 Jun 25
0
Goodness-of-fit for zero-truncated poisson distribution
...converge")
}
return(lambda)
}
3) Once I get there, I would like to apply a chi-square with (k-2) df, k
being the number of classes. Here the difficulty is to reduce the number
of classes so that a chi-square test may be applied. For instance:
Fi <- c(8, 5, 0, 4, 0, 1, 2, 0, 0, 1)
muHat <- trunpoismle(mean(Fi))
class <- 1 : 10
Exp <- muHat^class * exp(-muHat) / factorial(class)
Exp <- Exp[-1] / (1- Exp[1]) * sum(Fi)
# individuals seen 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 times
# This distribution maybe reduced to:
FiPooled <- c(8, 5, 4, 4)
# individuals seen 1, 2, 3-4...