search for: mynorm

Displaying 4 results from an estimated 4 matches for "mynorm".

Did you mean: myform
2009 Nov 18
2
Median on Aggregated data
...hts option) that the Counts variable is a frequency. So, the question is, is there a simple way to do the same thing in R? I have to run this on a large dataset -- for a small set it is not a problem. ---------------------- Begin R code ------------------------------------ N <- 1005 * 14; myNorm <- data.frame(PaydexNormingCategory = numeric(N), SIC = numeric(N), CatMedian = numeric(N)); k=1; #j = 7941; ## For testing only for (j in levels(SIC)){ for (i in levels(PaydexNormingCategory)){ myData <- dfpaydex[(Paydex==i) & (SIC==j),]; myMedian <- with(myData, levels(Payd...
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
...ant to integrate a normal distribution, given a median and sd. The integrate function works great BUT the first argument has to be a function so I do integrate(dnorm,0,1) and it works with standard m. and sd. But I have the m and sd given. So for fixed m and sd I work around with a new function mynorm mynorm <- function(n) { ret <- dnorm(n,0.6,0.15) ret } for example. BUT what can I do for dynamic m and sd? I want something like integrate(dnorm(,0.6,0.15),0,1), with the first dnorm parameter open for the integration but fixed m and sd. I hope you can help me. 2. I am working...
2010 Nov 14
1
Integrate to 1? (gauss.quad)
Does anyone see why my code does not integrate to 1? library(statmod) mu <- 0 s <- 1 Q <- 5 qq <- gauss.quad(Q, kind='hermite') sum((1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) * qq$weights) ### This does what's it is supposed to myNorm <- function(theta) (1/(s*sqrt(2*pi))) * exp(-((theta-mu)^2/(2*s^2))) integrate(myNorm, -Inf, Inf)
2012 Sep 18
1
creating graphs using Rook
...indow" value="60" checked>60 Days \n') res$write('<input type="radio" name="day.window" value="90">90 Days \n') res$write('<input type="submit" name="Go!">\n</form>\n<br>') myNormalize = function (target) { return((target - min(target))/(max(target) - min(target))) } if (!is.null(req$POST())) { # get the stock data as a data frame df <- as.data.frame(get.hist.quote(stock.symbol,start=as.character(Sys.Date() - as.numeric(day.window))...