similar to: recursive derivative a list of polynomials

Displaying 20 results from an estimated 3000 matches similar to: "recursive derivative a list of polynomials"

2011 Jan 26
0
Bivariate polynomials in R
Have you ever worked in R with bivariate polynomials? How did you implement simple operators like addition/multiplication? I found a package called multipol that seems to support these kinds of operators but I do keep receiving error. Check for example the following snippet of code (you can copy & paste) require('orthopolynom') require('polynom') require('multipol')
2008 Oct 16
3
defining a function using strings
Hi All, I need to evaluate a series expansion using Legendre polynomials. Using the 'orthopolinom' package I can get a list of the first n Legendre polynomials as character strings. > library(orthopolynom) > l<-legendre.polynomials(4) > l [[1]] 1 [[2]] x [[3]] -0.5 + 1.5*x^2 [[4]] -1.5*x + 2.5*x^3 [[5]] 0.375 - 3.75*x^2 + 4.375*x^4 But I can't figure out how to
2010 Dec 08
2
Legendre polynomials
Hello everyone, I would like to find out if there are already implemented function for legendre polynomials. I tried google but returns nothing. How do you suggest me to search for that? Regards Alex [[alternative HTML version deleted]]
2011 Jan 25
0
Multivariate polynomials Howto
Good Evening, I would like to work with multivariate polynomials (x and y variables). I know that there is a package called multipol but I am not sure that supports my needs. I use a function (in reality legendre.polynomials) which creates me the polynomials I want. For example the following returns > legendre.polynomials(2)[[2]] x (first order polynomial) I would like to calculate the
2008 Jul 01
1
Orthogonal polynomials and poly
Dear All, I have found in the poly help this sentence: The orthogonal polynomial is summarized by the coefficients, which can be used to evaluate it via the three-term recursion given in Kennedy & Gentle (1980, pp. 343–4), and used in the predict part of the code. My question: which type of orthogonal polynomials are used by this function? Hrmite, legendre.. TIA Giovanni [[alternative HTML
2011 Feb 12
1
R limits documented?
Is there documentation on R limits? That is, max matrix size, etc.? Diagnostics when limits are exceeded are not always meaningful. For example: > x <- rep(0,50000*50000) Error in rep(0, 50000 * 50000) : invalid 'times' argument In addition: Warning message: In as.vector(data) : NAs introduced by coercion Here's another example: > library(orthopolynom) > hermite <-
2008 Jul 08
2
attributing values to dataframe positions following eval
Hi everybody, I've been looking around, but can't seem to find the answer. I get a list of names (which vary, so I never know them in advance), and transform them into variables, each of which is a dataframe, using assign: polyList <- c("rs123", "rs124", "rs555", "rs000") numPoly <- length(polyList) for (k in 1:numPoly) {
2013 Oct 11
3
Gaussian Quadrature for arbitrary PDF
Hi all, We know that Hermite polynomial is for Gaussian, Laguerre polynomial for Exponential distribution, Legendre polynomial for uniform distribution, Jacobi polynomial for Beta distribution. Does anyone know which kind of polynomial deals with the log-normal, Student抯 t, Inverse gamma and Fisher抯 F distribution? Thank you in advance! David [[alternative HTML version deleted]]
2008 Jun 29
2
How to get an argument dynamically from a list?
Hi, I'd like to get an argument (I think it's the right term) dynamically from a list, but cannot manage to do it. Here is the code I use: #output given by database BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN <- c('A/A', 'C/A', '154/35') CLIFF <- c('A/C', 'C/C',
2007 Feb 12
1
How to get the polynomials out of poly()
Hi Folks! Im using the function poly to generate orthogonal polynomials, but Id like to see the actual polynomials so that I could convert it to a polynomial in my original variable. Is that possible and if so how do I do it? /E
2009 Jul 09
1
Converting indices of a matrix subset
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have two matrices: > m1 <- matrix(1,4,4) > m1 [,1] [,2] [,3] [,4] [1,] 1 1 1 1 [2,] 1 1 1 1 [3,] 1 1 1 1 [4,] 1 1 1 1 > m2 <- matrix(0,3,3) > diag(m2) <- 1 > m2 [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 1 0 [3,] 0 0 1 I want to get indicies from m2
2008 Jun 29
1
creating a dataframe using a list of the variable names
Hello, I'm fairly new to R, and despite spending quite some time exploring, testing, and looking for answers, I still have a couple of questions remaining... The first one is about creating a dataframe using a list of the variable names . I get this output file from a database: BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN
2010 Jan 17
3
enty-wise closest element
Dear R-users, i have a simple problem maybe, but i don't see the solution. i want to find the entry-wise closest element of an vector compared with another. ind1<-c(1,4,10) ind2<-c(3,5,11) for (i in length(ind2):1) { print(which.min(abs(ind1-ind2[i]))) } for ind2[3] it should be ind1[3] 10, for ind2[2] it should be ind1[2] 4 and for ind2[1] it should be ind1[1] 1. but with the
2006 Jan 07
1
maptools, write.polylistShape
Dear Roger, I am trying to use the write.polylistShape() function of maptools for the first time and realize that it handles list of polygons of class 'polylist'. However, it seems that no as.polylist() function exist in the package. The question behind that is: in your opinion, which would be the best way to convert a list of matrix of polygon nodes coordinates into an object of
2011 Mar 10
2
within group sequential subtraction
Hi Everyone, I would like to do sequential subtractions within a group so that I know the time between separate observations for a group of individuals. My data: data <- structure(list(group = c("IND1", "IND1", "IND2", "IND2", "IND2", "IND3", "IND4", "IND5", "IND6", "IND6"), date_obs =
2007 Apr 30
0
Intercept Coefficient in a Model with Orthogonal Polynomials
This very likely falls in the category of an unexpected result due to user ignorance. I generated the following data: time <- 0:10 set.seed(4302007) y <- 268 + -9*time + .4*(time^2) + rnorm(11, 0, .1) I then fit models using both orthogonal and raw polynomials: fit1 <- lm(y ~ poly(time, 2)) fit2 <- lm(y ~ poly(time, degree=2, raw=TRUE)) > predict(fit1, data.frame(time =
2006 Mar 09
1
HCLUST subroutine question -- FORTRAN DO loops
Shown below is most of the FORTRAN subroutine named HCLUST. My question concerns the DO loop labeled as '10'. What happened to its CONTINUE statement? I will assume that after FLAG(I)=.TRUE. is executed that control returns to DO 10 I=1,N. Am I correct? Dave ---------------------------- C Initializations C DO 10 I=1,N C We do not initialize MEMBR in order to be able to
2002 Oct 08
2
Orthogonal Polynomials
Looking to the wonderful statistical advice that this group can offer. In behavioral science applications of stats, we are often introduced to coefficients for orthogonal polynomials that are nice integers. For instance, Kirk's experimental design book presents the following coefficients for p=4: Linear -3 -1 1 3 Quadratic 1 -1 -1 1 Cubic -1 3 -3 1 In R orthogonal
2011 Mar 09
2
Cleaning date columns
Hi Everyone, I have the following problem: data <- structure(list(prochi = c("IND1", "IND1", "IND1", "IND2", "IND2", "IND2", "IND2", "IND3", "IND4", "IND5"), date_admission = structure(c(6468, 6470, 7063, 9981, 9983, 14186, 14372, 5129, 9767, 11168), class = "Date")), .Names =
2010 May 03
3
how to rewrite this for loops in matrix form without loop
x0=rnorm(100) y0=rpois(100,3)+1 ind=as.data.frame(table(y0)) ind1=ind[,1] ind2=ind[,2] phi=NULL for (i in 1:length(ind2)){ phi[i]=sum(x0[y0==ind1[i]])/ind2[i] } [[alternative HTML version deleted]]