Displaying 20 results from an estimated 110 matches similar to: "Error message: object of type 'closure' is not subsettable"
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
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,
2012 Jul 17
1
Threshold Quantile Regression code CRASHES in R
I am working on a two stage threshold quantile regression model in R, and my aim is to estimate the threshold of the reduced-form equation (call it rhohat), and the threshold of the structural equation (call it qhat), in two stages. On the first stage, i estimate rhohat by quantile regression and obtain the fitted values. I use these fitted values to estimate qhat on the second stage. The code is
2004 Dec 16
1
help with multiple imputation using imp.mix
I am desperately trying to impute missing data using 'imp.mix' but always
run into this yucky error message to which I cannot find the solution. It's
the first time I am using mix and I'm trying really hard to understand, but
there's just this one step I don't get...perhaps someone knows the answer?
Thanks!
Jens
My code runs:
2003 Jun 14
1
Missing data augmentation
Hi all,
A short while ago I asked a question about multiple imputation and I
got several helpful replies, thanks! I have untill now tried to use the
packages mice and norm but both give me errors however.
mice does not even run to start with and gives me the following error
right away:
iter imp variable
1 1 Liquidity.ratioError in chol((v + t(v))/2) : the leading minor
of order 1 is not
2005 Jul 08
2
missing data imputation
Dear R-help,
I am trying to impute missing data for the first time using R. The norm
package seems to work for me, but the missing values that it returns seem
odd at times -- for example it returns negative values for a variable that
should only be positive. Does this matter in data analysis, and/or is
there a way to limit the imputed values to be within the minimum and
maximum of the actual
2011 Nov 24
2
da.norm function
Hello all
I'm running da.norm function in R for climate data
rngseed(1234567)
theta1=da.norm(mydata, thetahat, steps=1000,showits=T)
param1=getparam.norm(mydata,theta1)
As I understand the 1000 steps represent the markov chain values. Is there
a way to plot them? Something like plot(1:1000, param1$mu[]). I just can't
find a way to extract them out of my theta1.
Thank you, Andrey.
2007 Jul 12
1
mix package causes R to crash
Dear Professor Schaefer
I am experiencing a technical difficulty with your mix package.
I would appreciate it if you could help me with this problem.
When I run the following code, R 2.5.1 and R 2.6.0 crashes.
It's been tested on at least 2 windows machine and it is consistent.
Execution code it's self was coped from the help file of imp.mix.
Only thing I supplied was a fake dataset.
2004 Aug 26
1
EM norm package (NA/NaN/Inf in foreign function call (arg 2))
Greetings!
I am bootstrapping and I am using EM in the norm package to fill in missing
data for a financial time series with each step of the loop. For the most
part EM works fine for me, but the following error message is guaranteed
before I hit the 200th scenario:
Iterations of EM:
1...2...3........348...349...Error: NA/NaN/Inf in foreign function call
(arg 2)
The following code should
2008 Dec 08
1
DLM - Covariates in the system equation
Is there a way to add covariates to the system equation in a time-varying
approach:
Y[t] = F'[t]theta[t] + v[t], v[t] ~ N[0,V] #observation equation
theta[t] = theta[t-1] + psi*Z[t] + w[t], w[t] ~ N[0,W] #system equation
While F[t] is a matrix of regressors to capture the short term effect on
the response series Y,
Z[t] measures the long-term effect of either
(1) two policies by a step
2008 Jul 21
5
Coefficients of Logistic Regression from bootstrap - how to get them?
Hello all,
I am trying to optimize my logistic regression model by using bootstrap.
I was previously using SAS for this kind of tasks, but I am now
switching to R.
My data frame consists of 5 columns and has 109 rows. Each row is a
single record composed of the following values: Subject_name, numeric1,
numeric2, numeric3 and outcome (yes or no). All three numerics are used
to predict
2003 Mar 11
0
Interrater and intrarater reliability
Dear R users
The following function is R code for the main compuations in the article:
M. Eliasziw, S Lorraine Young, M Gail Woodbury and Karen Fryday-Field (1994):
Statistical Methodology for the Concurrent Assessment of Intrarater and
Intrarater Reliability: Using Goniometric Measurements as an Example.
Physical Therapy 74 (8); 777-788
The function gives the estimated inter- and intrarater
2011 Aug 25
2
Adding a normal density curve over the empirical curve
Hi
I have created the following plot over the empirical returns.. What I now
want to do is to overlay a curve/line with the normal density as a
comparison of the two. Does anyone know how to do this?
(NB the last two lines are the problem, and are wrong, I know).
Thank you in advance!
Rikke
http://r.789695.n4.nabble.com/file/n3768783/S%26P_500_spot_and_return_2010.csv
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
2005 Oct 24
0
In da.norm Error: NA/NaN/Inf in foreign function call (arg 2)
I am conducting a simulation study generating multivariate normal data,
deleting observations to create a
data set with missing values and then using multiple imputation via
da.norm in Schafer's norm package.
>From da.norm, I get the following error message: "Error: NA/NaN/Inf in
foreign function call (arg 2)"
The frequency of the error message seems to depend on the ratio of n
2005 Oct 04
0
The error message in package Mix
Hi all,
When using package MIX, I often get the error: NA/NaN/Inf in foreign
function call (arg 1).
For example,
> s<-prelim.mix(Y,6)
Error in prelim.mix(Y, 6) : NA/NaN/Inf in foreign function call (arg 1)
or when I ran:
MI<-vector("list",5) #<--vector of complete data after MI
fit.model.mi<-vector("list",5)
rngseed(1234567) #<-- set random number
2005 Sep 27
0
Help: A application error and failed just-in-debugging.
Hello all,
When I ran my R program in R version 2.1.1 in windows XP and 2000, and I
downloaded a package call "MIX", I got an application error:
RGui:Rgui.exe - Application Error:
The instruction at "0x1009d8a1" referenced memory at "0xbde48f58". The
memory could not be "read".
Click on ok to terminate the program
click on cancel to debug the program
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] <-
2012 Jun 18
0
Obtaining r-squared values from phylogenetic autoregression in ape
Hello,
I am trying to carry out a phylogenetic autoregression to test whether my
data show a phylogenetic signal, but I keep calculating bizzare R-squared
values.
My script is:
> library(ape)
> x <-
2009 Jun 01
1
installing sn package
Hi r-users,
I want to use the sn package but I got the following message:
> install.packages(repos=NULL,pkgs="c:\\Tinn-R\\sn_0.4-12.zip")
Warning: package 'sn' is in use and will not be installed
updating HTML package descriptions
I did tried to do it a few times but it gives the same message.
________________________________
From: