similar to: Need help with function writing

Displaying 20 results from an estimated 300 matches similar to: "Need help with function writing"

2007 Sep 24
1
hypothesis testing
This was sent to me by someone on the R-list ( I don't know her ) but I don't have time to look at this right now so I told her I would send it to the R-list because she said it keeps getting bounced when she sends it. #======================================================================= ==================================================================== I am a bit confused with
2011 May 02
2
easy way to do a 2-D fit to an array of data?
Hi, I've got a matrix, Z, of values representing (as it happens) optical power at each pixel location. Since I know in advance I've got a single, convex peak, I would like to do a 2D parabolic fit of the form Z = poly((x+y),2) where x and y are the x,y coordinates of each pixel (or equivalently, the row, column numbers). Is there an R function that lets me easily implement that?
2006 Oct 27
2
Multivariate regression
Hi, Suppose I have a multivariate response Y (n x k) obtained at a set of predictors X (n x p). I would like to perform a linear regression taking into consideration the covariance structure of Y within each unit - this would be represented by a specified matrix V (k x k), assumed to be the same across units. How do I use "lm" to do this? One approach that I was thinking of
2007 Feb 27
1
Additional args to fun in integrate() not found?
Hello, fellow Rdicts, I have the code for the program below. I need to integrate a function of "x" and "p". I use integrate to integrate over "x" and pass "p" as an additional argument. "p" is specified and given default value in the argument list. Still, integrate() cannot read "p", unless I explicitly insert a numeric value in the
2005 Jul 08
1
help with ARIMA and predict
I'm trying to do the following out of sample regression with autoregressive terms and additional x variables: y(t+1)=const+B(L)*y(t)+C(1)*x_1(t)...+C(K)*x_K(t) where: B(L) = lag polynom. for AR terms C(1..K) = are the coeffs. on K exogenous variables that have only 1 lag Question 1: ----------- Suppose I use arima to fit the model:
2012 Feb 09
2
Lattice 3d coordinate transformation
Hello List! I asked this before (with no solution), but maybe this time... I'm trying to project a surface to the XY under a 3d cloud using lattice. I can project contour lines following the code for fig 13.7 in Deepayan Sarkar's "Lattice, Multivariate Data Visualization with R", but it fails when I try to "color them in" using panel.levelplot. ?utilities.3d says there
2007 Sep 04
3
how to do interpolation
Hello R Users, How to make a variable equidistance with time i.e. how to interpolate a variable if it is not sampled at equal time interval. Many thanks, Regards, Yogesh [[alternative HTML version deleted]]
2008 Apr 15
1
glm syntax question
Hello, I'm new to R and have a very basic syntax question for the functionglm. I am using the function glm() to do a regression on a data set. I want to run this function in a while loop, so I need to be able to do two things: (1) I need to be able to have my list of variables in the regression be based from a variable vector instead of hard code. (2) I need to be able to collect the
1999 Nov 17
3
Plot problem !
Hello, Is there a simple way to make a plot with xy coordinates and a z value which determines the size and the color of point on the plot? Thanks for your help ! Emilie -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe"
2004 Oct 06
1
Foreign code problem
Hello, I wanted to test the odesolve package and tried to use compiled C-code. But when I do: erg <- lsoda(y, times, "mond", parms, rtol, atol, tcrit=NULL, jacfunc=NULL, verbose=FALSE, dllname="mond", hmin=0, hmax=Inf) I get the error message: Error in lsoda(y, times, "mond", parms, rtol, atol, tcrit = NULL, jacfunc =
2012 Dec 09
1
Error message "cs_lu(A) failed: near-singular A (or out of memory)"
Hi there everyone, I have the following model (this is naturally a simplified version just for showing my problem, in case you're wondering this is a translog cost function with the associated cost share equations): C ~ á + â1 log X + â2 log Y + ã1 log Z + ã2 log XX C1 ~ â1 + â2 log YY + ã1 log ZZ Then I have some restrictions on the coefficients, namely that the sum of â equal 1 and the
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2007 Jul 27
3
(PR#9811) sequence(c(2, 0, 3)) produces surprising results,
This is as doumented, and I think you could say the same thing of seq(). BTW, sequence() allows negative inputs, and I don't think you want sum(input) in that case. I've never seen the point of sequence(), but it has been around in R for a long time. It is used in packages eRm, extRemes, hydrosanity, klaR, seas. Who knows what people have in private code, so I don't see any
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
> -----Original Message----- > From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org] > On Behalf Of Yijing Wang > Sent: Saturday, July 26, 2014 8:39 AM > To: linux-kernel at vger.kernel.org > Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org; > Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm- > kernel at
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
> -----Original Message----- > From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org] > On Behalf Of Yijing Wang > Sent: Saturday, July 26, 2014 8:39 AM > To: linux-kernel at vger.kernel.org > Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org; > Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm- > kernel at
2011 Oct 08
1
HWEBayes, swapping the homozygotes genotype frequencies
I evaluated the Bayes factor in the k=2 allele case with a "triangular" prior under the null as in the example in the help file: HWETriangBF2(nvec=c(88,10,2)) [1] 0.4580336 When I swap the n11 entry and n22 entry of nvec, I received totally different Bayes factor: > > HWETriangBF2(nvec=c(2,10,88)) [1] 5.710153 > In my understanding, defining the genotype frequency as
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
> -----Original Message----- > From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org] > On Behalf Of Yijing Wang > Sent: Saturday, July 26, 2014 8:39 AM > To: linux-kernel at vger.kernel.org > Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org; > Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm- > kernel at
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
> -----Original Message----- > From: linux-pci-owner at vger.kernel.org [mailto:linux-pci-owner at vger.kernel.org] > On Behalf Of Yijing Wang > Sent: Saturday, July 26, 2014 8:39 AM > To: linux-kernel at vger.kernel.org > Cc: Xinwei Hu; Wuyun; Bjorn Helgaas; linux-pci at vger.kernel.org; > Paul.Mundt at huawei.com; James E.J. Bottomley; Marc Zyngier; linux-arm- > kernel at
2010 Nov 28
1
faster base::sequence
Hello, Based on yesterday's R-help thread (help: program efficiency), and following Bill's suggestions, it appeared that sequence: > sequence function (nvec) unlist(lapply(nvec, seq_len)) <environment: namespace:base> could benefit from being written in C to avoid unnecessary memory allocations. I made this version using inline: require( inline ) sequence_c <- local( {