Displaying 20 results from an estimated 100 matches similar to: "how to do interpolation"
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
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 25
2
Need help with function writing
Hello:
If anyone could guide me with this I would greatly appreciate it. Thanking you in advance for your assistance.
Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement?
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
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"
2001 Dec 19
2
How to create a data.frame "like" another, but longer?
Hello,
does anyone know of a quick way to create a data frame "like" another, but
with more rows?
What I'd like to do is this:
if mydata is a data.frame like
a b c
1 TRUE yes
2 FALSE no
3 TRUE yes
I'd like to get mydata2 with the same column names and column types, but
without the values and with more rows.
All I could think of was to manually do
2009 Mar 25
1
Piecewise
Hi,
I am a biologist (relatively new to R) analyzing data which we predict
to fit a power function. I was wondering if anyone knew a way to model
piecewise functions in R, where across a range of values (0-x) the data
is modeled as a power function, and across another range (x-inf) it is a
linear function. This would be predicted by one of our hypotheses, and
we would like to find the AICs
2007 Dec 09
1
buglet in curve?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Symptoms: curve with log x axis gets the wrong
x limits (in 2.6.1, I believe introduced in this version).
Credit goes to Mike McCoy for detecting the problem.
Demonstration:
x = 1:5
plot(x,5*exp(-x),xlim=c(0.1,1000),log="x")
xvec = 10^seq(-1,3,length=100)
lines(xvec,5*exp(-xvec))
curve(5*exp(-x),add=TRUE,col=2,lwd=3)
I believe
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
2000 Jan 19
1
Segmentation fault using integrate()
Hi all,
Running R 0.90.1 on a RH 6.1 system. Installation of the
integrate_2.1-2 package went smoothly. My code contains a loop
in which integrate() is called several times in each pass.
I get a segmentation fault after what seems to be a random number
of calls to integrate(). Debug output shows:
Program received signal SIGSEGV, Segmentation fault.
promiseArgs (el=0x40276414,
2007 May 12
1
Area() artefacts??
Hello, everybody
I run the following program, and depending on the size of eps I get
different results.
With eps=1e-05, the program calculates wrong values for x=65:67 and
others. The program runs fine with eps=1e-07. Why is this so?
Also, I am using area() instead of integrate() because I cannot make
integrate to work, especially with imaginary numbers. Maybe someone
can show me how to use
2004 Jul 01
1
\middle in Rd.sty conflicts with newer LaTeX?
Rd.sty defines
\newlength{\middle}
which seems to be in conflict with the my latex installation.
Here is a minimal example:
\documentclass{article}
\newlength{\middle}
\begin{document}
\end{document}
It runs fine on a Linux box:
carp:136% latex test.tex
This is TeX, Version 3.14159 (Web2C 7.3.1)
(test.tex
LaTeX2e <2000/06/01>
Babel <v3.7h> and hyphenation patterns for american,
2007 Jul 24
1
How to add circular text for a graph with concentric circles
Dear R experts,
I am plotting the population of students who live in a city, and in
successive circular bands made of the contiguous districts that surround
the city. This is a stylized figure, where I specify the area of each
successive circle based on the cumulative population of students. I want
to compare two sets of concentric circles across different populations -
such as 'All
2008 Nov 20
1
binomial glm???
Hi everyone,
newbee query!
I've installed R 2.8.0 and tried to run this simple glm -
x is no of cars in a given year, y is the number voted in an election
that year while n is the population 18+:
votes <- data.frame(x = c(0.62,0.77,0.71,0.74,0.77,0.86,1.13,1.44),
+ y=c(502,542,711,653,771,806,934,1123), n=
2004 Aug 06
7
question on downsampling
Hi,
Maybe a bit off topic for this list, bt anyway.
I have received several feature requests for DarkIce to support
downsampling of the audio input before passing it to lame or ogg vorbis.
For example the audio read from the soundcard would be 44.1kHz, and lame
would get it at 22.05kHz.
I figure two ways of doing this:
1. For lame, one can specify the input and the desired mp3 sampling
rate,
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 Jun 09
0
-lgsl -lgslcblas fatal error no such file or directory
Hello,
Novice programmer.
I'm writing C source code and compiling it in as *.dll in the terminal by R
CMD SHLIB foo.c. It works, I'm on a 64 bits windows system. I have the
lastest R 2.15.0 and Rtools using the gcc 4.6.3 compiler.
However, that was a hello world run, and I installed GSL for the 64 bit
system for fast MCMC. The Rcpp package was easy to use, but I opted for a C
with GSL
2012 Jun 16
0
R CMD -lgsl -lgslcblas *.c returns a fatal error: gsl/gsl_rng.h no such file or directory exists
Hello,
I tried this posted on the R devel subforum but no help so far. Maybe the
wider net will be fruitful. Probably a pretty simple issue.
The short story goes, I'm writing C source code and compiling it in as *.dll
in the windows terminal by R CMD SHLIB foo.c. It works, I'm on a 64-bit
system. I have the lastest R 2.15.0 and Rtools, and I am using the gcc 4.6.3
compiler.
However,
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