Displaying 10 results from an estimated 10 matches similar to: "Use of optim to fit two curves at the same time ?"
2010 Dec 27
3
Drop column from a data frame
I am trying to drop a column of a data frame. The code below attempts to drop a numeric column (which does not work but gives no error or warning) and a factor column (which does not work but gives an error).
I would appreciate someone telling me why my code does not work, and suggesting code that will work.
Thanks,
John
rm(dfxyz,dfxz,dfxy)
# create the data frame.
dfxyz <-
2011 Jan 06
4
Different LLRs on multinomial logit models in R and SPSS
Hello, after calculating a multinomial logit regression on my data, I
compared the output to an output retrieved with SPSS 18 (Mac). The
coefficients appear to be the same, but the logLik (and therefore fit)
values differ widely. Why?
The regression in R:
set.seed(1234)
df <- data.frame(
"y"=factor(sample(LETTERS[1:3], 143, repl=T, prob=c(4, 1, 10))),
"a"=sample(1:5,
2008 Apr 01
1
superimpose histogram on biplot
Hi all,
I've been trying to figure out how to superimpose a histogram on a
biplot that shows the relative contribution of each axis. I have
been using the NIPALS function (http://biomserv.univ-lyon1.fr/~dray/
files/softwares/nipals.R) to run principal component analyses. Here
is a toy example.
source("http://biomserv.univ-lyon1.fr/~dray/files/softwares/nipals.R")
2011 Mar 04
1
grouping data
Hi R-list,
I have a data set with plot locations and observations and want to label
them based on locations. For example, I have GPS information (x and y) as
follows:
> x
[1] -87.85092 -87.85092 -87.85092 -87.85093 -87.85093 -87.85093 -87.85094
[8] -87.85094 -87.85094 -87.85096 -87.85095 -87.85095 -87.85095 -87.85096
[15] -87.85096 -87.85096 -87.85096 -87.85088 -87.85088 -87.85087
2013 Nov 19
1
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Estimado Eric
En Hmisc la función labcurve puede ser útil, en todos casos crear una
curva con valores constantes, habría que intentar, pero labcurve en
algunos ejemplos en mi computadora no anda.
Ayer envié dos correos, el primero era de latticeextra, usted nombra
lattice, pero podría funcionar, en latticeextra:
## horizontal and vertical lines
xyplot(ysim ~ xsim) +
layer(panel.ablineq(v
2005 Sep 21
3
Sort a data frame with respect to more than one variable
Dear All,
How can I sort a data frame with respect to more than one variable?
I know that for one variable X one may use: df[order(df$X), ] where df is the data frame containing X.
Many thanks,
Bernard
---------------------------------
[[alternative HTML version deleted]]
2013 Jul 05
3
should the text for RIGHT_ASSIGN be -> in getParseData()?
Hi,
The text column for '->' becomes '<-' in the data frame returned by
getParseData():
> getParseData(parse(text='1->x'))
line1 col1 line2 col2 id parent token terminal text
7 1 1 1 4 7 0 expr FALSE
1 1 1 1 1 1 2 NUM_CONST TRUE 1
2 1 1 1 1 2 7 expr FALSE
3
2013 Nov 19
2
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Eric
Recordé un ejemplo rápido
## Setup up coordinate system (with x == y aspect ratio):
plot(c(-2,3), c(-1,5), type = "n", xlab = "x", ylab = "y", asp = 1)
## the x- and y-axis, and an integer grid
abline(h = 0, v = 0, col = "gray60")
text(1,0, "abline( h = 0 )", col = "gray60", adj = c(0, -.1))
abline(h = -1:5, v = -2:3, col =
2002 Jun 21
3
generating points over a function, its possible???
Hi,
I have a new (for me) situation.
I have a function for one linear model:
y = 9.7909-0.035*x
I have the variance of system
var = 13.01403
Is possible to create a random vector points of Y (simulating the real data)
over this curve using the function and the variance? I need this to a
discipline.
I have this:
| \
| \ -> y = 9.7909-0.035*x and var = 13.014
| \
| \
| \
| \
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
V;
Sent via BlackBerry from T-Mobile
-----Original Message-----
From: r-help-request at r-project.org
Date: Tue, 30 Sep 2008 12:00:06
To: <r-help at r-project.org>
Subject: R-help Digest, Vol 67, Issue 31
Send R-help mailing list submissions to
r-help at r-project.org
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-help
or, via email,