search for: yhsu6

Displaying 10 results from an estimated 10 matches for "yhsu6".

2009 Jul 17
6
Solving two nonlinear equations with two knowns
Dear R users, I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal solution changes when I change initial values. How to solve this? BTW, I also try to use grid searching. But I have no information on ranges of x1 and x2, respectively. Any suggestion to solve this question? Thanks, Kate
2009 Oct 26
0
MLE for noncentral t distribution
...sounds like what you want, since you said the "sample > mean = 0.23, s = 4.04, etc. A noncentral t has an additional > "noncenrality parameter". > > Hope this helps. > Spencer > > Martin Maechler wrote: > >>>>>> "k" == kate <yhsu6 at uiuc.edu> > >>>>>> on Thu, 8 May 2008 10:45:04 -0500 writes: > >>>>>> > > > > k> In my data, sample mean =-0.3 and the histogram looks like t > distribution; > > k> therefore, I thought non-central t distributio...
2008 Mar 28
1
Question about legend
My original legend is matplot(c,cbind(ES5,ES75,chisq,t),type ='l', col=c("brown","red","blue","black"),ylab='power') legend(5,0.7,paste(c("0.5th ES test","0.75th ES test", "Chi-square test", "t test")),col=c("brown","red","blue","black"),lty=1:4,cex=1) I would
2008 Mar 30
1
Plot for jump point
Hi, My code is as the following, ratio<-seq(0,1,by=0.01) payoff<-NULL for (i in 1:length(ratio) ) { payoff1<-100*(ratio[i]>=0.7)+max(100*(1+(ratio[i]-1)*2),0)*(ratio[i]<0.7) payoff<-c(payoff,payoff1) } plot(ratio,payoff, xlab='ST/S0', ylab='Payoff',type='l') I have the discontinuous point at ratio=0.7. I do not want to have the line at 0.7, and would
2010 Mar 12
2
Question regarding to maxNR
Hi R-users, Recently, I use maxNR function to find maximizer. I have error appears as follows Error in maxNRCompute(fn = fn, grad = grad, hess = hess, start = start, : NA in the initial gradient My code is mu=2 s=1 n=300 library(maxLik) set.seed(1004) x<-rcauchy(n,mu,s) loglik<-function(mu) { log(prod(dcauchy(x,mu,s))) } maxNR(loglik,start=median(x))$estimate Does anyone know how
2008 Mar 31
1
Find the index for min of a matrix
Hi, My example is as the following, W<-matrix(c(2,4,2,8,1,3),ncol=3) which(W==min(W)) I would like to find the index for min of the matrix W, i.e. (1, 3) instead of 5 as the output. What command could I use? Thanks, Kate [[alternative HTML version deleted]]
2008 Mar 31
1
3d plot
Hi, I would like to have 3d plot, and I found that there is a command "scatterplot3d". x is V, y=sigmaV, and z=TSE (note: After some calculation, I update TSE). How could I do to have 3d plot I want? V<-seq(1279,1280,,100) sigmaV<-seq(0.28,0.29,,100) TSE<-matrix(0, length(V),length(sigmaV)) ps: TSE[i,j] corresponds to V[i] and sigmaV[j]. Thanks, Kate [[alternative HTML
2008 Jun 05
1
Smooth Spline
Hi, I have three original curves as follows, n<-seq(20,200,by=10) t<-c(0.1138, 0.1639, 0.2051, 0.2473, 0.2890, 0.3304, 0.3827, 0.4075, 0.4618, 0.4944, 0.5209, 0.5562, 0.5935, 0.6197, 0.6523, 0.6771, 0.6984, 0.7209, 0.7453) es<-c(0.3682, 0.4268, 0.5585, 0.6095, 0.7023, 0.7534, 0.8225, 0.8471, 0.8964, 0.9098, 0.9371, 0.9514, 0.9685, 0.9747, 0.9812, 0.9859, 0.9905, 0.9923, 0.9940)
2008 Aug 11
1
variance covariance matrix of parameter estimate using nlrq
In "lm" command, we can use "vcov" option to get variance-covariance matrix. Does anyone know how to get variance-covariance matrix in nlrq? Thanks, Kate [[alternative HTML version deleted]]
2008 May 08
3
MLE for noncentral t distribution
I have a data with 236 observations. After plotting the histogram, I found that it looks like non-central t distribution. I would like to get MLE for mu and df. I found an example to find MLE for gamma distribution from "fitting distributions with R": library(stats4) ## loading package stats4 ll<-function(lambda,alfa) {n<-200 x<-x.gam