[R] question about non-linear least squares in R

2007-09-05 Thread Yu (Warren) Wang
Hi, everyone, My question is: It's not every time that you can get a converged result from the nls function. Is there any solution for me to get a reasonable result? For example: x - c(-0.06,-0.04,-0.025,-0.015,-0.005,0.005,0.015,0.025,0.04,0.06) y -

Re: [R] question about non-linear least squares in R

2007-09-05 Thread Moshe Olshansky
Below is one possibility: If you knew MA you would get a regular linear least-squares for parameters A,B and constant which can be easily solved. So now you can define a function f(MA) which returns that value. Now you must minimize that f - a function of one argument. It can have several local

Re: [R] question about non-linear least squares in R

2007-09-05 Thread apjaworski
09/05/2007 02:51 [R] question about non-linear least AMsquares in R

[R] Question about making array dataset inside a package

2007-09-05 Thread Wallace Hui
Hello I have a question about how I can include an array dataset inside a package. In our package, one R function is designed to take an array of 2 rows * 2 columns * k levels as input data enter by the user, where k is positive integers. I am trying to include a 3-D array of 2-by-2-by-8

Re: [R] Question about making array dataset inside a package

2007-09-05 Thread Kuhn, Max
@stat.math.ethz.ch Subject: [R] Question about making array dataset inside a package Hello I have a question about how I can include an array dataset inside a package. In our package, one R function is designed to take an array of 2 rows * 2 columns * k levels as input data enter by the user, where

[R] question: randomization t-test function already defined in R?

2007-09-05 Thread Karen.Green
Dear R Users, I am hoping you can help me. I have received code from a colleague who uses Matlab. I need to translate it into R. I am wondering if there is a randomization t-test (from non-parametric statistics) function already defined in R. (In Matlab the function is randtest.m.)

Re: [R] question: randomization t-test function already defined in R?

2007-09-05 Thread Achim Zeileis
On Wed, 5 Sep 2007, [EMAIL PROTECTED] wrote: Dear R Users, I am hoping you can help me. I have received code from a colleague who uses Matlab. I need to translate it into R. I am wondering if there is a randomization t-test (from non-parametric statistics) function already defined in R.

[R] Question on graphs and simple if statements

2007-09-02 Thread JHawk3
Hi all, I'm a relatively new user to the R interface, and am trying to do some basic operations. So far I've used the curve() command to plot graphs. This has a couple of limitations, namely trying to do piecewise graphs. Basically, I'm looking for how to do if and while loops for making a

Re: [R] Question on graphs and simple if statements

2007-09-02 Thread Ross Darnell
The answer to your first question is curve(ifelse((x-1)(x1),x^2+1,x+2),from=-10,to=10) Sorry I cannot understand the next part of your query. Ross Darnell On Sun, 2007-09-02 at 00:31 -0700, JHawk3 wrote: Hi all, I'm a relatively new user to the R interface, and am trying to do some basic

[R] Question on shardsplot

2007-08-31 Thread ebi
Dear All, Would you please tell me how to display the sample No. on the map ? ---Below commands don't display the sample No.(from 1 to 150).--- library(som) library(klaR) iris.som3 - som(iris[,1:4], xdim = 14,ydim = 6) library(klaR); opar- par(xpd = NA) shardsplot(iris.som3, data.or =

Re: [R] Question on shardsplot

2007-08-31 Thread Uwe Ligges
Ebi, keisyu, or whatever your name is, I know that this questions has already been answered by the shardplot author in a private thread, where this has been posted under a different name. Why do you obscure your real name on the list??? The answer by Nils Raabe was that shardsplot is intended

[R] Question about writing some code

2007-08-20 Thread squall44
Just a short question: Why does this work: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26-boxplot(x, add=FALSE, horizontal=TRUE, main=Figur 2.6 Boxplot, axes=FALSE) ...but this doesn't... x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26 - boxplot(x) plot(F26,

Re: [R] Question about writing some code

2007-08-20 Thread Uwe Ligges
squall44 wrote: Just a short question: Why does this work: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26-boxplot(x, add=FALSE, horizontal=TRUE, main=Figur 2.6 Boxplot, axes=FALSE) boxplot returns some information on the boxplot, but the result

Re: [R] Question on R server and TinnR

2007-08-20 Thread adschai
you again. - adschai - Original Message - From: Adaikalavan Ramasamy Date: Monday, August 20, 2007 8:19 am Subject: Re: [R] Question on R server and TinnR To: [EMAIL PROTECTED] I don't understand your question on how to make R act as a server. If you want to execute different pre

Re: [R] Question about lme and AR(1)

2007-08-19 Thread Thomas Lumley
On Sat, 18 Aug 2007, Francisco Redelico wrote: Dear R users, As far as I know, EM algorithm can be only applied to estimate parameter from a regular exponential family. No. The EM algorithm will converge to a stationary point (and except in artificial cases, to a local maximum) for any

[R] Question on R server and TinnR

2007-08-19 Thread adschai
Hi - Classic question that I tried to look up online and couldn't find a clear answer. It seems that I can have R to act as a server. But I never know how this works. Would anyone please provide an example or introduction material where I can learn about this? I'm trying to build an

Re: [R] Question about unicode characters in tcltk

2007-08-18 Thread Peter Dalgaard
R Help wrote: hello list, Can someone help me figure out why the following code doesn't work? I'm trying to but both Greek letters and subscripts into a tcltk menu. The code creates all the mu's, and the 1 and 2 subscripts, but it won't create the 0. Is there a certain set of characters

Re: [R] Question about unicode characters in tcltk

2007-08-18 Thread Gavin Simpson
On Sat, 2007-08-18 at 14:40 +0200, Peter Dalgaard wrote: R Help wrote: hello list, Can someone help me figure out why the following code doesn't work? I'm trying to but both Greek letters and subscripts into a tcltk menu. The code creates all the mu's, and the 1 and 2 subscripts, but

[R] Question about lme and AR(1)

2007-08-18 Thread Francisco Redelico
Dear R users, As far as I know, EM algorithm can be only applied to estimate parameter from a regular exponential family. A multivariate normal distribution with an AR(1) matrix as covariance matrix does not belong to a regular exponential family, it is belong to a curved exponential

Re: [R] Question about sm.options sm.survival

2007-08-17 Thread Prof Brian Ripley
On Thu, 16 Aug 2007, Rachel Jia wrote: Hi, there: It's my first time to post question in this forum, so thanks for your tolerance if my question is too naive. I am using a nonparametric smoothing procedure in sm package to generate smoothed survival curves for continuous covariate. I want

[R] Question about sm.options sm.survival

2007-08-16 Thread Rachel Jia
Hi, there: It's my first time to post question in this forum, so thanks for your tolerance if my question is too naive. I am using a nonparametric smoothing procedure in sm package to generate smoothed survival curves for continuous covariate. I want to truncate the suvival curve and only

[R] Question on output of vectors from a for loop into a matrix

2007-08-16 Thread Ryan Briscoe Runquist
Hello R-help, I am a recent convert to R from SAS and I am having some difficulty with output of a for loop into a matrix. I have searched the help manuals and the archives, but I can't get my code to work. It is probably a syntax error that I am not spotting. I am trying to make a distance

Re: [R] Question on output of vectors from a for loop into a matrix

2007-08-16 Thread Dylan Beaudette
On Thursday 16 August 2007 15:35, Ryan Briscoe Runquist wrote: Hello R-help, I am a recent convert to R from SAS and I am having some difficulty with output of a for loop into a matrix. I have searched the help manuals and the archives, but I can't get my code to work. It is probably a

[R] Question about unicode characters in tcltk

2007-08-14 Thread R Help
hello list, Can someone help me figure out why the following code doesn't work? I'm trying to but both Greek letters and subscripts into a tcltk menu. The code creates all the mu's, and the 1 and 2 subscripts, but it won't create the 0. Is there a certain set of characters that R won't

Re: [R] Question about unicode characters in tcltk

2007-08-14 Thread Peter Dalgaard
R Help wrote: hello list, Can someone help me figure out why the following code doesn't work? I'm trying to but both Greek letters and subscripts into a tcltk menu. The code creates all the mu's, and the 1 and 2 subscripts, but it won't create the 0. Is there a certain set of characters

[R] question regarding is.factor()

2007-08-13 Thread Jabez Wilson
Dear all, please help with what must be a straightforward question which I can't answer. I add a column of my dataframe as factor of an existing column e.g. df[,5] - factor(df[,2]) and can test that it is by is.factor() but if I did not know in advance what types the

Re: [R] question regarding is.factor()

2007-08-13 Thread Prof Brian Ripley
typeof() for 'types'. However, factor is not a type but a class, so class() is probably what you want. On Mon, 13 Aug 2007, Jabez Wilson wrote: Dear all, please help with what must be a straightforward question which I can't answer. But 'An Introduction to R' could. I add a column of my

Re: [R] question regarding is.factor()

2007-08-13 Thread Henrique Dallazuanna
See ?class -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 13/08/07, Jabez Wilson [EMAIL PROTECTED] wrote: Dear all, please help with what must be a straightforward question which I can't answer. I add a column of my dataframe as factor of an existing column

[R] question on glmmML compared to NLMIXED

2007-08-12 Thread Fluss
Hello! Can anyone help me. I am using the posterior.mode from the result of glmmML. It apears to be different from the BLUe estimate of the RANDOM statement in PROC NLMIXED in SAS. Why is that? Thank you Ronen [[alternative HTML version deleted]]

Re: [R] QUESTION ON R!!!!!!!!!!!1

2007-08-11 Thread Uwe Ligges
I think I asked you yesterday on the [EMAIL PROTECTED] account to read the posting guide *before* posting to R-help and I asked you not to SHOUT!!! Uwe Ligges lecastil wrote: Good day. I am employed at a public entity that handles million information and records of several

[R] QUESTION ON R!!!!!!!!!!!1

2007-08-10 Thread lecastil
Good day. I am employed at a public entity that handles million information and records of several variables and distributed in several topics. For the statistical analyses we use a statistical package, which allows us to call directly of the database (ORACLE) the information and to realize

[R] Question regarding QT device

2007-08-05 Thread Saptarshi Guha
Hi, After a few modifications in the makefiles, I successfully compiled the Qt device (written by Deepayan Sirkar) for OS X 10.4.9 on a Powerbook. However when loading into R If i remove this line from zzz.R in qtutils/R grDevices::deviceIsInteractive(QT)

Re: [R] Question regarding QT device

2007-08-05 Thread Prof Brian Ripley
grDevices::deviceIsInteractive is only in the unreleased R-devel version of R: which version are you using? Please do study the R posting guide: we do ask for basic information for a good reason, and do ask for questions on packages (especially unreleased packages) to be sent to the

Re: [R] Question regarding QT device

2007-08-05 Thread deepayan . sarkar
On 8/5/07, Saptarshi Guha [EMAIL PROTECTED] wrote: Hi, After a few modifications in the makefiles, I successfully compiled the Qt device (written by Deepayan Sirkar) for OS X 10.4.9 on a Powerbook. Cool, can you send me the modifications? I haven't managed to compile qtutils on OS X yet

[R] question about logistic models (AIC)

2007-08-03 Thread Tom Willems
Dear fellow R-ussers, I have a question about the Akaike Information Criterion in the R output. Normally you would want it to be as small as possible, yet when i check up the information in my study books, the AIC is usually displayed as a negative number. In the exercises it is given as -

Re: [R] question about logistic models (AIC)

2007-08-03 Thread Kyle.
Tom: That's a good question. AIC, as i'm sure you know, is usually calculated as 2k-2ln(L), where k is the number of free parameters in the model, and L is the log-likelihood of the model. The goal of AIC--and the reason one normally tries to select a model with minimal AIC--is to

Re: [R] question about logistic models (AIC)

2007-08-03 Thread Ben Bolker
Tom Willems Tom.Willems at var.fgov.be writes: I have a question about the Akaike Information Criterion in the R output. Normally you would want it to be as small as possible, yet when i check up the information in my study books, the AIC is usually displayed as a negative number. In

Re: [R] question about logistic models (AIC)

2007-08-03 Thread Ted Harding
On 03-Aug-07 16:42:33, Kyle. wrote: Tom: That's a good question. AIC, as i'm sure you know, is usually calculated as 2k-2ln(L), where k is the number of free parameters in the model, and L is the log-likelihood of the model. The goal of AIC--and the reason one normally tries to

Re: [R] question about logistic models (AIC)

2007-08-03 Thread Kyle Ambert
Ah. Very good point. I stand corrected. ---Kyle. [EMAIL PROTECTED] 08/03/07 10:32 AM On 03-Aug-07 16:42:33, Kyle. wrote: Tom: That's a good question. AIC, as i'm sure you know, is usually calculated as 2k-2ln(L), where k is the number of free parameters in the model, and L is

Re: [R] question on using gl1ce from lasso2 package

2007-07-25 Thread Berwin A Turlach
G'day Li, On Wed, 25 Jul 2007 00:50:43 -0400 Li Li [EMAIL PROTECTED] wrote: I tried several settings by using the family=gaussian in gl1ce, but none of them works. [...] gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length, data=iris,family=gaussian()) Error in eval(expr, envir,

[R] question on using gl1ce from lasso2 package

2007-07-24 Thread Li Li
Hi, I tried several settings by using the family=gaussian in gl1ce, but none of them works. For the case glm can work. Here is the error message I got: glm(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length

[R] Question about cmdscale function

2007-07-23 Thread Andrew Wood
Hi. I know matrices that use distances between places works fine when using cmdscale. However, what about matrices such as: A B C D E A 01 23 12 9 B 10 10 12 3 C 23 10 0 23 4 D 12 12 23 0 21 E 9 34 21 0 i.e. matrices which do not

[R] Question about genalg in R

2007-07-21 Thread adschai
Hi I am first looking at genalg as a starting point for GA implementation in R. I have a couple of questions regarding this package and GA implementation in general. If you could provide some hints on these questions, I would really appreciate. Thank you in advance. 1. I found two methods for

[R] question about ar1 time series

2007-07-16 Thread Josué Polanco
Hello everybody, I recently wrote a program that to generate AR1 time series, here the code: #By Jomopo. Junio-2007, Leioa, Vizcaya #This program to create the AR1 syntetic series (one by one) #Where the mean is zero, but the variance of the serie AR1 and #the coef. of AR1 are be changed. If

Re: [R] Question about acception rejection sampling - NOT R question

2007-07-16 Thread Greg Snow
. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leeds, Mark (IED) Sent: Friday, July 13, 2007 2:45 PM To: r-help@stat.math.ethz.ch Subject: [R] Question about acception

[R] Question about Network library

2007-07-16 Thread Joe Swiatek
Hello, I'm a bit new to R and am trying to plot a network using the network package. Based on the documentation, if I do the following steps, things work fine: test = c(0,1,1,1,0,0,0,1,0) m = matrix(test, 3) g = network(m) plot(g) However, if I try to read in the above

Re: [R] question about ar1 time series

2007-07-16 Thread Vincent Goulet
Le 07-07-16 à 09:50, Josué Polanco a écrit : Hello everybody, I recently wrote a program that to generate AR1 time series, here the code: #By Jomopo. Junio-2007, Leioa, Vizcaya #This program to create the AR1 syntetic series (one by one) #Where the mean is zero, but the variance of the

[R] Question about acception rejection sampling - NOT R question

2007-07-13 Thread Leeds, Mark \(IED\)
This is not related to R but I was hoping that someone could help me. I am reading the Understanding the Metropolis Hastings Algorithm paper from the American Statistician by Chip and Greenberg, 1995, Vol 49, No 4. Right at the beginning they explain the algorithm for basic acceptance rejection

Re: [R] Question about acception rejection sampling - NOT R question

2007-07-13 Thread Charles C. Berry
On Fri, 13 Jul 2007, Leeds, Mark (IED) wrote: This is not related to R but I was hoping that someone could help me. I am reading the Understanding the Metropolis Hastings Algorithm paper from the American Statistician by Chip and Greenberg, 1995, Vol 49, No 4. Right at the beginning they

[R] question about gamm models

2007-07-11 Thread Matthias an der Heiden
Dear R-Users, I have a question concerning mixed models in R. The strata of my model are the counties of Germany. The differencies between these counties should be modelled as realizations of a normally distributed random variable X. Moreover, the model contains a 0/1 variable A that enters as

Re: [R] Question for svm function in e1071

2007-07-09 Thread adschai
thank you. This is definitely doable. - adschai- Original Message -From: David Meyer Date: Friday, July 6, 2007 6:34 amSubject: Re: [R] Question for svm function in e1071To: [EMAIL PROTECTED]: r-help@stat.math.ethz.ch Adschai: The function is written in C++, so debugging the source

Re: [R] Question for svm function in e1071

2007-07-06 Thread David Meyer
Adschai: The function is written in C++, so debugging the source code of the R svm() function will not really help. What you can do to make the C-code more verbose is the following: - get the sources of e1071 - in the src/ directory, look up the svm.cpp file - In line 37, there is: #if 0

Re: [R] Question for svm function in e1071

2007-07-05 Thread Leeds, Mark \(IED\)
05, 2007 12:36 AM To: r-help@stat.math.ethz.ch Subject: [R] Question for svm function in e1071 Hi, Sorry that I have many questions today. I am using svm function on about 180,000 points of training set. It takes very long time to run. However, I would like it to spit out something to make sure

Re: [R] Question about framework to weighting different classes in SVM

2007-07-05 Thread David Meyer
Adschai: here is an example for class.weights (isn't it on the help page?): data(iris) i2 - iris levels(i2$Species)[3] - versicolor summary(i2$Species) wts - 100 / table(i2$Species) wts m - svm(Species ~ ., data = i2, class.weights = wts) Cheers, David

[R] Question on Rmpi looping

2007-07-05 Thread Kathy Gerber
Dear R list, In the course of learning to work with Rmpi, we are confused about a few points. The following simple program is based on some examples we retrieved from the web. Each slave is writing the same output line multiple times (a multiple equal to the number of slaves). In other words,

[R] Question about framework to weighting different classes in SVM

2007-07-04 Thread adschai
Hi gurus, I have a doubt about multiclass classification SVM. The population in my data includes a couple of class labels that have relatively small proportion of the entire population compared to other classes. I would like SVM to pay more attention to these classes. However, the question I

[R] Question for svm function in e1071

2007-07-04 Thread adschai
Hi, Sorry that I have many questions today. I am using svm function on about 180,000 points of training set. It takes very long time to run. However, I would like it to spit out something to make sure that the run is not dead in between. Would you please suggest anyway to do so? And is

[R] Statistics Question not R question: competing risks and non-informative censoring

2007-07-03 Thread sj
All, I am working with Emergency Department (ED) Length of Stay Data. The ED visit can end in one of a variety of ways (Admit, discharge, transfer, etc...) Initially, I have modeled the time to event by fitting a survival model to the time the outcome of interest and treat all other outcomes

[R] Question about PCA with prcomp

2007-07-02 Thread James R. Graham
Hello All, The basic premise of what I want to do is the following: I have 20 entities for which I have ~500 measurements each. So, I have a matrix of 20 rows by ~500 columns. The 20 entities fall into two classes: good and bad. I eventually would like to derive a model that would then be

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Mark Difford
Hi James, Have a look at Cadima et al.'s subselect package [Cadima worked with/was a student of Prof Jolliffe, one of _the_ experts on PCA; Jolliffe devotes part of a Chapter to this question in his text (Principal Component Analysis, pub. Springer)]. Then you should look at psychometric stuff:

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Ravi Varadhan
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Difford Sent: Monday, July 02, 2007 1:55 PM To: r-help@stat.math.ethz.ch Subject: Re: [R] Question about PCA

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Patrick Connolly
On Mon, 02-Jul-2007 at 03:16PM -0400, Ravi Varadhan wrote: | Mark, | | What you are referring to deals with the selection of covariates, since PC | doesn't do dimensionality reduction in the sense of covariate selection. | But what Mark is asking for is to identify how much each data point |

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Ravi Varadhan
PROTECTED] Sent: Monday, July 02, 2007 4:23 PM To: Ravi Varadhan Cc: 'Mark Difford'; r-help@stat.math.ethz.ch Subject: Re: [R] Question about PCA with prcomp On Mon, 02-Jul-2007 at 03:16PM -0400, Ravi Varadhan wrote: | Mark, | | What you are referring to deals with the selection of covariates, since

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Mark Difford
:55 PM To: r-help@stat.math.ethz.ch Subject: Re: [R] Question about PCA with prcomp Hi James, Have a look at Cadima et al.'s subselect package [Cadima worked with/was a student of Prof Jolliffe, one of _the_ experts on PCA; Jolliffe devotes part of a Chapter to this question in his text

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Bill.Venables
to think about it. Bill Venables. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ravi Varadhan Sent: Monday, 2 July 2007 1:29 PM To: 'Patrick Connolly' Cc: r-help@stat.math.ethz.ch; 'Mark Difford' Subject: Re: [R] Question about PCA with prcomp

Re: [R] Question about PCA with prcomp

2007-07-02 Thread Mark Difford
' Subject: Re: [R] Question about PCA with prcomp The PCs that are associated with the smaller eigenvalues. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division

[R] Evaluating predictive power with no intercept-statistics question - not R question

2007-06-28 Thread Leeds, Mark \(IED\)
I realize that the following has been talked about on this list many times before in some related way but I am going to ask for help anyway because I still don't know what to do. Suppose I have no intercept models such as the following : Y = B*X_1 + error Y = B*X_2 + error Y = B*X_3 + error Y =

[R] question

2007-06-26 Thread Amir_17
Hi I have two tree and i want compute error of each tree and then cmparison with t.test. I cant coding this problem.Could i help me? Regards - [[alternative HTML version deleted]] __

[R] Question on package building

2007-06-20 Thread Ev Whin
Hi dear R-Help members: When I was building my R package, using $R CMD build --binary pkg it came out the following error: ** libs Error: package 'methods' was built for x86_64-unknown-linux-gnu Execution halted The information about $R_HOME/library/methods/libs/methods.so is: $file

[R] Question about lmer

2007-06-18 Thread Julia Proudnikova
Hello, We have a problem with function lmer. This is our code: Get_values-function(ff_count, fixed_factors, rf_count, random_factors, y_values) { SA-matrix(as.array(c(fixed_factors, random_factors)), ncol=3) data-as.data.frame(SA) y-as.array(y_values) dd-data.frame(SA) for(i

Re: [R] Question about lmer

2007-06-18 Thread Douglas Bates
On 6/18/07, Julia Proudnikova [EMAIL PROTECTED] wrote: Hello, We have a problem with function lmer. This is our code: Get_values-function(ff_count, fixed_factors, rf_count, random_factors, y_values) { SA-matrix(as.array(c(fixed_factors, random_factors)), ncol=3)

Re: [R] [Not R question]: Better fit for order probit model

2007-06-17 Thread adschai
9:59 amSubject: Re: [R] [Not R question]: Better fit for order probit modelTo: R-help@stat.math.ethz.ch At 03:17 AM 6/16/2007, adschai wrote: Thank you so much Robert. I haven't thought about the idea of clumping categories together. One of the reason is because these categories are bridge

Re: [R] [Not R question]: Better fit for order probit model

2007-06-17 Thread Robert A LaBudde
At 01:29 PM 6/17/2007, adschai wrote: Thank you so much Robert. Please find the information below. The scale 1-10 are subjective physical condition ratings scored by inspection engineers at the site. 1-5 are in very bad conditions (bridge close down to seriously deteriorated). The rest from

Re: [R] [Not R question]: Better fit for order probit model

2007-06-16 Thread adschai
as to how you would make the order probit fits better in this case? Thank you so much in advance.- adschai- Original Message -From: Robert A LaBudde Date: Friday, June 15, 2007 9:52 pmSubject: Re: [R] [Not R question]: Better fit for order probit modelTo: R-help@stat.math.ethz.ch At 09:31

Re: [R] question about formula for lm

2007-06-16 Thread Mike Lawrence
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pedro Mardones Sent: Thursday, June 14, 2007 1:14 PM To: R-help@stat.math.ethz.ch Subject: [R] question about formula for lm Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1

Re: [R] [Not R question]: Better fit for order probit model

2007-06-16 Thread Robert A LaBudde
At 03:17 AM 6/16/2007, adschai wrote: Thank you so much Robert. I haven't thought about the idea of clumping categories together. One of the reason is because these categories are bridge condition rating scores. They indeed represent different meaning and serviceability conditions. They vary

Re: [R] question about formula for lm

2007-06-16 Thread Douglas Bates
in a character variable is substitute(foo ~ Xvar, list(foo = as.name(Ytext)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pedro Mardones Sent: Thursday, June 14, 2007 1:14 PM To: R-help@stat.math.ethz.ch Subject: [R] question about formula for lm

Re: [R] question about formula for lm

2007-06-16 Thread Gabor Grothendieck
A couple of easy ways are to create the calling sequence as a call or character string and then evaluate it: eval(bquote(lm(.(as.name(Ytext)) ~ Xvar, X))) eval(parse(text = paste(lm(, Ytext, ~ Xvar, X Note that these solutions both have the advantage over some of the prior solutions that

[R] [Not R question]: Better fit for order probit model

2007-06-15 Thread adschai
Hi, I have a model which tries to fit a set of data with 10-level ordered responses. Somehow, in my data, the majority of the observations are from level 6-10 and leave only about 1-5% of total observations contributed to level 1-10. As a result, my model tends to perform badly on points that

Re: [R] [Not R question]: Better fit for order probit model

2007-06-15 Thread Robert A LaBudde
At 09:31 PM 6/15/2007, adschai wrote: I have a model which tries to fit a set of data with 10-level ordered responses. Somehow, in my data, the majority of the observations are from level 6-10 and leave only about 1-5% of total observations contributed to level 1-10. As a result, my model tends

[R] question about formula for lm

2007-06-14 Thread Pedro Mardones
Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) # does run The main idea is to use Ytext as input in a function, so you just type Yvar and

Re: [R] question about formula for lm

2007-06-14 Thread Thomas Petzoldt
Why not using: lm(X[[Ytext]]~Xvar,data=X) ThPe Pedro Mardones wrote: Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) #

Re: [R] question about formula for lm

2007-06-14 Thread John Kane
First check the value of Ytext. Try Ytext - X$Yvar --- Pedro Mardones [EMAIL PROTECTED] wrote: Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't run

Re: [R] question about formula for lm

2007-06-14 Thread Greg Snow
: Thursday, June 14, 2007 1:14 PM To: R-help@stat.math.ethz.ch Subject: [R] question about formula for lm Dear all; Is there any way to make this to work?: .x-rnorm(50,10,3) .y-.x+rnorm(50,0,1) X-data.frame(.x,.y) colnames(X)-c(Xvar,Yvar) Ytext-Yvar lm(Ytext~Xvar,data=X) # doesn't

[R] Question with nlm

2007-06-14 Thread adschai
Hi, I would really appreciate if I could get some help here. I'm using nlm to minimize my negative log likelihood function. What I did is as follows: My log likelihood function (it returns negative log likelihood) with 'gradient' attribute defined inside as follows: # ==Method

[R] question about data availale in .RData file using the biobase package

2007-06-11 Thread ramakanth reddy
Hi all I am analyzing micro array data and I have R workspace images as my source of the data(.Rdata format).That was in the biobase package format,so I used some commands from the bio base package manual and could write the data into excel files. The data I am working on is the cancer data.

[R] Question on weighted Kaplan-Meier analysis of case-cohort design

2007-06-10 Thread xiao-jun ma
I have a study best described as a retrospective case-cohort design: the cases were all the events in a given time span surveyed, and the controls (event-free during the follow-up period) were selected in 2:1 ratio (2 controls per case). The sampling frequency for the controls was about

[R] Svar: Re: help with simple R-question

2007-06-06 Thread Rina Miehs
thanks, that works great!! just have another thing...i the same area What if the class is list instead of array, how can you name the first unrecognized column? Rina John Kane [EMAIL PROTECTED] 06/05/07 3:17 --- Rina Miehs [EMAIL PROTECTED] wrote: hello what do i write for R to

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread John Kane
--- Rina Miehs [EMAIL PROTECTED] wrote: thanks, that works great!! just have another thing...i the same area What if the class is list instead of array, how can you name the first unrecognized column? I am not sure that I understand the question. You don't really have an unrecognised

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread Rina Miehs
The left column is boar id number, and the right is the random effect estimate. I need the numbers in the left column when i merge far1 together with other data.frames based on the id numbers. When i use ranef the output is the class list and R only sees the intercepts, but i need a data.frame

[R] Odp: Svar: Re: help with simple R-question

2007-06-06 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 06.06.2007 10:56:18: thanks, that works great!! just have another thing...i the same area What if the class is list instead of array, how can you name the first unrecognized column? Hi look in some intro manual and learn about R data structures. Matrix,

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread John Kane
I think that you have the same situation as before though I have never used ranef(). The boar ids are acting as the row names and are not really part of the data.frame. It just looks like that when R prints the data.frame. Try boars - rownames(far1) far1 - cbind( boars, far1) The results

Re: [R] Svar: Re: help with simple R-question

2007-06-06 Thread Rina Miehs
Thanks that helped in the right way:D Thanks alot! Rina John Kane [EMAIL PROTECTED] 06/06/07 1:46 I think that you have the same situation as before though I have never used ranef(). The boar ids are acting as the row names and are not really part of the data.frame. It just looks like that

[R] Question on RandomForest in unsupervised mode

2007-06-06 Thread Irilenia Nobeli
Hi, I attempted to run the randomForest() function on a dataset without predefined classes. According to the manual, running randomForest without a response variable/class labels should result in the function assuming you are running in unsupervised mode. In this case, I understand that

[R] Question: RMySQL bulk load/update one column, dbWriteTable()?

2007-06-06 Thread Waverley
Hi, I have a question reading using RMySQL trying to load one R vector into a table column. To be more specifically, the table is there populated. Now I add a new column and want to populate this. Can some colleagues on this list teach me how to do this? I know how to write one R object/table

Re: [R] Question: RMySQL bulk load/update one column, dbWriteTable()?

2007-06-06 Thread Chris Stubben
I have a question reading using RMySQL trying to load one R vector into a table column. To be more specifically, the table is there populated. Now I add a new column and want to populate this. Okay, this is more of an SQL question now, but you could just use dbWriteTable and then do an

Re: [R] Question: RMySQL bulk load/update one column, dbWriteTable()?

2007-06-06 Thread Waverley
Thanks Chris. I am trying almost the same solution while I have failed the dbWriteTable. The problem of using update is that it is way TOO slow when the row size is ~20. That is why I hope I can still get dbWriteTable way to add one column. dbWriteTable is very efficient and fast. The

[R] Question about parse and expression

2007-06-06 Thread Nitin Jain
Dear R-users, In the following example, I would like to see my ylabel as: beta[3] * x[3] + epsilon (where beta and epsilon are replaced by their mathematical symbols). Please advise. Thanks. Nitin i - 3 ee - expression(beta[i] * x[i] + epsilon) xyplot(1:10~ 11:20, ylab =

Re: [R] Question about parse and expression

2007-06-06 Thread Charles C. Berry
On Wed, 6 Jun 2007, Nitin Jain wrote: Dear R-users, In the following example, I would like to see my ylabel as: beta[3] * x[3] + epsilon (where beta and epsilon are replaced by their mathematical symbols). Please advise. ?plotmath ?bquote example(plotmath)

Re: [R] Question about parse and expression

2007-06-06 Thread Gabor Grothendieck
Try this: library(lattice) x - 1:10 i - 3 xlab - as.expression(substitute(beta[i] * x[i] + epsilon, list(i = i))) xyplot(x ~ x, xlab = xlab) On 6/6/07, Nitin Jain [EMAIL PROTECTED] wrote: Dear R-users, In the following example, I would like to see my ylabel as: beta[3] * x[3] + epsilon

  1   2   3   4   5   6   7   8   9   10   >