similar to: nonlinear modeling with rational functions?

Displaying 20 results from an estimated 3000 matches similar to: "nonlinear modeling with rational functions?"

2003 Jul 12
2
using cut on matrices
Dear list, I'd like to use the function cut() on matrices, ie that when I apply it to a matrix, it would return a matrix of the same dimensions instead of a vector. I wonder if there is a better (more elegant) solution than matrix(cut(a, ...), ncol=ncol(a), nrow=nrow(a)) because I would like to use cut on both vectors and matrices and avoid testing whether a is a matrix. Thanks, Tamas
2004 Jul 05
1
general questions about R on debian/powerpc
Hi, I am about to but a laptop, and have narrowed the choices down to a Dell Latitude 600 and an Apple Powerbook G4 Aluminium (Princeton provides these models at a discount for grad students). I am biased towards the Powerbook, and would like to run Debian on it. I have only used debian on i386 platforms so far. I use R quite frequently, so I would be interested in your experience of running R
2003 Apr 23
1
Setting up Xemacs + Sweave
Dear list, I have tried to setup my Xemacs for use with Sweave, which I indend to learn. I have followed the instructions in the Sweave FAQ, that is to say, I put (defun Rnw-mode () (require 'ess-noweb) (noweb-mode) (if (fboundp 'R-mode) (setq noweb-default-code-mode 'R-mode))) (add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode)) (add-to-list
2002 Sep 11
1
rational approximations to the normal cdf
In the R source, nmath/pnorm.c contains the code for a rational function approximation for the normal cdf. These constants are listed: const double a[5] = { 2.2352520354606839287, 161.02823106855587881, 1067.6894854603709582, 18154.981253343561249, 0.065682337918207449113 }; The source file cites a paper by Cody (1969) and states that these
2004 Apr 10
4
(offtopic) I need two sets of 5 different color scales
Hi, I am plotting a policy function (result from a dynamic stochastic optimization problem, discretized approximation). The policy function maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space (B and F are usually between 4-6, and represent domestic and foreign savings. The other variables are income (Y), inflation (Pi), domestic and foreign interest rates (R and Z)). I
2004 May 21
2
Re: Windows versus Unix packages in CRAN ...
Janusz Kawczak wrote: > You simply need to remove the stuff related to MS Win from zzz.R; > in partricular the lines after if( .... ) to clear your message. > As you can see, the info relates to the WinMenu under MS Win. I think people have been more than a little disingenuous in claiming that getting the Rmetrics package to go under Linux is transparent. If you have to dig into the
2003 Oct 06
1
visualizing transition probability matrices
Dear List, I have a couple of (~200) 3x3 transition probability matrices (ie each defines a Markov chain). They are all estimated from the same underlying process, so it ie meaningful to take their elemetwise mean and standard deviation. [1] First question: supposing that they are given in a list l, how do I get their elementwise mean and standard deviation? Fortunately, the mean of trans. prob.
2011 Jun 14
1
functions for polynomial and rational interplation?
Are there implementations of, e.g. Neville's algorithm, for interpolating polynomials through some data points? Nevilles' is an improvement on Lagrange interpolation. And how about interpolating rational functions? I could not find anything at rseek.org or at crantastic.org. thanks -- View this message in context:
2003 Oct 01
3
fitting Markov chains
I need to find a computationally simple process for the movement of interest rates. In this simplified model, an interest rate can have 3--5 possible values, and its movement is characterized by a matrix of transition probabilities (ie, it is a Markov process). I would like to estimate this process from a given set of data. For example, let the interest rate time series be: 7 3 8 2 5 9 6
2004 Apr 25
7
R vs Matlab: which is more "programmer friendly"?
Hi, The department of economics at our university (Budapest) is planning a course on numerical methods in economics. They are trying to decide which software to use for that, and I would like to advocate R. The other alternative is Matlab. I have found comparisons in terms of computational time for matrix algebra, but I don't think that is relevant: the bottleneck for economists is usually
2004 Mar 31
1
extracting values from a 3d array using a matrix from indices
Suppose I have A, an n x m matrix, each element is an integer (an index). I also have B, an n x l x m array. I need C, where C[n,m] = B[n, A[n, m], m] I am currently using loops, what would be the "R way" to do this? Another question: let A[n, m] <- argmax_l B[n, l, m] what would be the nicest way of doing this? Currently I am using max.col and a single loop, going though the
2004 Apr 21
2
resetting the interpreter
Hi, Sometimes I want to "reset" the R interpreter (as if I quit and started it again, with everything starting from scratch). The main reason for this is when I expreriment with calculations, and later form them into general functions, sometimes I forget to include variables or reset some settings which I don't notice because they are already set. This causes problems during batch
2004 Apr 26
1
need settings for the listings package
Hi, I am typesetting R code in TeX using the listings package. I have experimented with various settings for the text, but all look a bit ugly. This might be because I have no typographic experience ;-) I would really appreciate if people sent me the settings they use for the listings package (eg in the \usepackage line, or \lstset, I am thinking about choices for basicstyle, ... etc). I
2003 Apr 17
1
Testing for whole numbers
Is there a way in R to test if a given number is an integer, ie a whole number? I am not referring to the data type of a number, but to its value. That is to say, is.whole(pi-pi+2) would be TRUE, whereas is.whole(4/3) would be false. At the moment I am using is.whole <- function(a) { floor(a)==a } which is OK for real numbers, but not for complex ones (a+bi would be a whole number if both a
2002 May 16
2
WinBind does not work well with Rational ClearCase ( bug fix attached :)
Gerald, No worries. This patch is required if your using Rational ClearCase and you don't want everyone to have access to it. It's to fix a brokenness (IMO) within ClearCase, and maybe other programs. Our windows primary group has 10k+ users... I will shoot it off to Rational, so they can provide it to there customers. I was hoping it could be applied to the main tree so I could just
2003 Apr 05
3
slides in linux R
Hello, In S-Plus Windows you can transform graphics to Powerpoint very easily, in R Windows you can use enhanced metafiles (.emf) and Powerpoint almost as easy. Is there a simular way with R in Linux to transform to the presentation program in StarOffice or OpenOffice or are you stuck with the pdf device? Fredrik Lundgren
2004 Apr 07
1
eigenvalues for a sparse matrix
Hi, I have the following problem. It has two parts. 1. I need to calculate the stationary probabilities of a Markov chain, eg if the transition matrix is P, I need x such that xP = x in other words, the left eigenvectors of P which have an eigenvalue of one. Currently I am using eigen(t(P)) and then pick out the vectors I need. However, this seems to be an overkill (I only need a single
2004 Apr 02
2
"(de)linearizing" array indices
Hi, I have a dynamic programming problem with many state variables, let's call them l, n, m, etc. The transition probabilities are originally given in an array form, eg transtition[l,m,n,ll,mm,nn] give the probability of going from l,m,n to ll,mm,nn. However, the numerical solution is best handled when I "flatten" the L x M x N state space into a single one (call it S), ie a
2004 Jun 25
3
sweave: graphics not at the expected location in the pdf
Hi I use sweave for excellent pdf output (thank you- Friedrich Leisch). I have just one problem. Quite often it happens, that the graphics are not at the place where I expect them, but (often on a separate page) later on in the pdf. How can I fix this, means how can I define, that I want a graphic exactly here and now in the document? Many thanks and best regards Christoph -- Christoph
2004 Apr 22
1
Re: pausing a program
R: I have a program that runs a For loop for days and I need to (if possible) pause the program. Any ideas on how to do that? If I use stop, how certain can I be that all the statements executed in the previous iteration of the for loop? Thanks, Jason Higbee Research Associate Federal Reserve Bank of St. Louis E: jason.l.higbee@stls.frb.org [[alternative HTML version deleted]]