similar to: Adding a normal density curve over the empirical curve

Displaying 20 results from an estimated 500 matches similar to: "Adding a normal density curve over the empirical curve"

2011 Aug 18
3
Error message: object of type 'closure' is not subsettable
Dear R-users I need to calibrate kappa, rho, eta, theta, v0 in the following code, see below. However when I run it, I get: y <- function(kappahat, rhohat, etahat, thetahat, v0hat) {sum(difference(k, t, S0, X, r, implvol, q, kappahat, rhohat, etahat, thetahat, v0hat)^2)} > nlminb(start=list(kappa, rho, eta, theta, v0), objective = y, lower =lb, > upper =ub) Error in dots[[1L]][[1L]] :
2011 Aug 16
2
Calibrating the risk free interest rate using nlminb
Dear R-users I am trying to find a value for the risk free rate minimizing the difference between a BS call value with impl. volatilities minus the market price of a call (assuming this is just the average bid ask price) Here is my data: http://r.789695.n4.nabble.com/file/n3747509/S%26P_500_calls%2C_jan-jun_2010.csv S%26P_500_calls%2C_jan-jun_2010.csv S0 <- 1136.03 q <- 0.02145608 S0
2012 Apr 08
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Apr 4, 2012, at 9:32 PM, Paul J. Lucas wrote: > On Mar 23, 2012, at 4:46 PM, Bill Wendling wrote: [...] > This all seems to work just fine. I can throw a C++ exception either in a C++ object's constructor or in an ordinary member function and the stack unwinds correctly (the object's destructors are called) and the exception is propagated back up the C++ code that called the
2005 Oct 14
1
mount_smbfs: unable to open connection: syserr = No such file or directory
Alright, so Here is the relevant info: FreeBSD insomniac.normal1.net 5.4-STABLE FreeBSD 5.4-STABLE #2: Sun Sep 25 14:30:27 PDT 2005 root@insomniac.normal1.net:/usr/obj/usr/src/sys/INSOMNIAC i386 insomniac# pkg_info | grep samba samba-3.0.20,1 A free SMB and CIFS client and server for UNIX insomniac# Alright, So I have four samba clients (2 'nix, 1 mac and 1 windows). The windows
2009 Mar 02
2
Fwd: Converting R to Sweave (Rnw)
Hi I am thinking about using Sweave more frequently, especially for documenting code. But the syntax is slightly awkward for me (<<name>>= ... @), and I was thinking if there would be a way of importing the type of code extracted from an Rnw file back into an Rnw file? The advantage would be that the code could run in R without tangling. Obviously, sweave options could not be
2012 Apr 08
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Apr 8, 2012, at 4:20 AM, Bill Wendling wrote: > On Apr 4, 2012, at 9:32 PM, Paul J. Lucas wrote: > >> This all seems to work just fine. I can throw a C++ exception either in a C++ object's constructor or in an ordinary member function and the stack unwinds correctly (the object's destructors are called) and the exception is propagated back up the C++ code that called the
2008 Jun 08
1
label points on a graph
Hello everyone, I have a plot and I am wanting to label points as 1 through 20 I have the following code for the plot: dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1) file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt")
2008 Dec 22
2
How can I avoid nested 'for' loops or quicken the process?
Hi All, I'm still pretty new to using R - and I was hoping I might be able to get some advice as to how to use 'apply' or a similar function instead of using nested for loops. Right now I have a script which uses nested for loops similar to this: i <- 1 for(a in Alpha) { for (b in Beta) { for (c in Gamma) { for (d in Delta) { for (e in Epsilon) { Output[i] <-
2008 Jun 07
1
error message with dat
Hello everyone, I have two problems which I am unable to solve : 1.I am trying to add the  row labels (g1-g2000) to the very left of a data table. The data table is 2000 rows  by 62 columns.I have used the following code. read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1) rowname(dat) <- paste("g", c(1:nrow(dat)),
2011 Aug 26
3
How to vectorize a function to handle two vectors
Dear R-users I am trying to "vectorize" a function so that it can handle two vectors of inputs. I want the function to use phi (a function), k[1] and t[1] for the first price, and so on for the second, third and fourth price. I tried to do the mapply, but I dont know how to specify to R what input I want to be vectors (k and t)(see in the bottom what I tried). I have read the help file,
2011 Nov 15
0
Quantstrat; error with applyStrategy()
I'm testing out quantstrat using a simple one-indicator strategy. The error I get after applyStrategy(...) is Error in .xts(e, .index(e1), .indexCLASS = indexClass(e1), .indexFORMAT = indexFormat(e1), : index length must match number of observations In addition: Warning messages: 1: In match.names(column, colnames(data)) : all columns not located in roc_15 for STOXX.Open STOXX.High
2018 Jan 18
3
Split charts with ggplot2, tidyquant
Could you provide some information on your data structure (e.g., are the two time series in separate columns in the data)? The solution is fairly straightforward once you have the data in the right structure. And I do not think tidyquant is necessary for what you want. Best, Charlie -- Charles Redmon GRA, Center for Research Methods and Data Analysis PhD Student, Department of Linguistics
2008 Apr 16
2
extenspy and chanspy
I want to add to my dialplan the ability to spy on an arbitrary extension whether a call originates at it or is terminated at it. Scenario 1: Given an extension, say 2001, a call comes in on a zap channel and is Dial()ed to the phone that's at extension 2001, I want to be able to pick up a phone and dial (say) *142001 and spy on that call. Scenario 2: Extension 2001 makes a call to, say a
2018 Jan 18
0
Split charts with ggplot2, tidyquant
Hi Charlie, I am comfortable to put the data in any way that works best. Here are two possibilities: an xts and a data frame. library(quantmod) quantmod::getSymbols("SPY") # creates xts variable SPY SPYxts <- SPY[,c("SPY.Close","SPY.Volume")] SPYdf <- data.frame(Date=index(SPYxts),close=as.numeric(SPYxts$SPY.Close),
2012 Nov 02
2
Date format conversion from "2012-09-20" to "2012:09:20"
Hi R, How to get the range of values form startDate to lastDate as given below?. #***************************************************************** # Load historical data #****************************************************************** library('quantmod') endDate =Sys.Date() startDate = as.Date(endDate-30, order="ymd") dataspy = getSymbols("SPY", from = startDate,
2011 Oct 18
1
Chanspy() not working with group in asterisk 1.4.42
Hi list, I have write down my code on which chanspy not working when I make a group with name of spy. Please help me where is the issue on that. a) caller will call this number to join konference and spy group exten => 43681111,1,Answer() exten => 43681111,n,NoOp(****${CHANNEL}****) exten => 43681111,n,Set(GROUP(${CHANNEL})=spy) exten => 43681111,n,Set(a=${GROUP_LIST(spy)}) exten
2018 Jan 19
2
Split charts with ggplot2, tidyquant
So the general strategy for getting these into separate panels in ggplot is to have a single variable that will be your response and a factor variable that indexes which original variable it came from. This can be accomplished in many ways, but the way I use is with the melt() function in the reshape2 package. For example, library(reshape2) plotDF <- melt(SPYdf, ??? ??? ??? ??? ??? ???
2008 Dec 14
1
how to convert factors to numbers
Hello, I am relatively new to using R. I am using R version 2.8.0. I have a program that downloads stock data from Yahoo! Finance and stores it to a text file on my hard drive. The text file contains the date, opening price, high price, low price, closing price, volume and adjusted price (i.e., adjusted for dividends and splits). I want to read and manipulate the data in R. However, when I
2012 Aug 05
1
R: Help xts object Subset Date by Day of the Week
I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols("SPY") # Subset Prices to just closing price SP500 <- Cl(SPY) # Show day of the week for each date using 2-6 for monday-friday SP500wd <- wday(SP500) # Add Price and days of week together
2012 Mar 04
1
Store vectors as values in xts time-series object
Hi R programmers, I have stumbled across what seems a very simple problem. My goal is to create a xts time series object which contains vectors as values. In other words, I try to create something like this: 2009-01-01 => c('aa', 'bb', 'dd') ... 2010-02-01 => c('mm') I have figured out parts of separately. Here's what works (new xts time-series with