search for: mysigma

Displaying 5 results from an estimated 5 matches for "mysigma".

2012 Mar 22
2
Quicker way to apply values to a function
Hi all, myint=function(mu,sigma){ integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value } mymu=seq(-3,3,length(1000)) mysigma=seq(0,1,length(500))[-1] k=1 v=c() for (j in 1:length(mymu)) { for (i in 1:length(mysigma)) { v[k]=myint(mymu[j],mysigma[i]) k=k+1 } } Basically, I want to investigate for what values of mu and sigma, the integral is divergent. Is there another way to do this other than loops? For now, t...
2009 Aug 12
2
Using bold font with bquote
...or blue, but when I try to change the font of the text to bold, R doesn't seem to recognize the "font=" command in the same way here as it does with "col=". (My code is below) set.seed(1) Data=rnorm(100,sd=10000) plot(density(Data)) text(25000,0.00003, bquote(sigma==.(mySigma), list('mySigma'=format(round(sd(Data),digits=3),big.mark=","))), col="blue") After searching the help files I've tried using the expression command with "bold()" as well as inserting "font=2" after the color command. However, I can't see...
2009 Aug 12
2
Plotting sigma symbol with unicode and turning into pdf
...?plotmath, it looks like when using expressions you set the >> font > inside the expression (e.g. bold(x)). It looks you tried this already > but I wonder if there was something tiny out of place since the > following works for me: > > text(25000,0.00003,bquote(bold(sigma==.(mySigma)),list('mySigma'=format(round(sd(Data),digits=3),big.mark=","))), > col='blue') > > Scott > > Scott Sherrill-Mix Department of Microbiology University of > Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphia, > PA 19104-6076 > &g...
2012 Oct 20
1
Logistic regression/Cut point? predict ??
...@y.values output<-c(int,slope,cutmid,accuracy,auc) names(output)<-c("Intercept","Slope","CutPoint","Accuracy","AUC") return(output) } y<-fitglm(.05,1) y nreps <- 500; output<-data.frame(matrix(rep(NA),nreps,6,ncol=6)) mysigma<-.5 mytau<-.1 i<-1 for(j in 1:nreps) { output[j,1:5]<-fitglm(mysigma,mytau) output[j,6]<-j } names(output)<-c("Intercept","Slope","CutPoint","Accuracy","AUC","Iteration") apply(output,2, mean) apply(output,2,...
2009 Aug 11
1
Paste symbol and calculation in plot
I'm trying to annotate a density plot and I would like to have R calculate the standard deviation and place it in the plot next to the standard deviation symbol "sigma". I can successfully use the text command to paste "StDev =",round(sd(Data),digits=3)) on the plot. However, I have trouble when I want to replace "StDev" with the Greek symbol sigma (See code