Re: [R] problem with plm package

2011-09-03 Thread Liviu Andronic
(please reply to the list, too, as it increases your chances of getting a helpful answer) On Sat, Sep 3, 2011 at 2:51 AM, loth lorien lothlorie...@hotmail.com wrote: Hi Liviu, Thank you for your suggestions, but they didn't seem to work. I got R to estimate a fixed effects model for me:

Re: [R] problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome

2011-09-03 Thread Dennis Murphy
Hi: I tried to figure out what you were doing...some of it I think I grasped, other parts not so much. On Fri, Sep 2, 2011 at 8:18 PM, Maya Joshi maya.d.jo...@gmail.com wrote: Dear R experts. I might be missing something obvious. I have been trying to fix this problem for some weeks. Please

Re: [R] misclassification rate

2011-09-03 Thread Patrick Breheny
On 09/02/2011 05:29 PM, Doussa wrote: I have a matrix in wich there are two colmns( yp, yt) Yp: predicted values from my model. yt: true values ( my dependante variable y is a categorical;3 modalities (0,1,2) I don't know how to procede to calculate the misclassification rate and the error

Re: [R] problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome

2011-09-03 Thread Maya Joshi
Dear R experts: Thank you Dennis and David ... As David indicated sorry of language and I have tried to explain what I intend to do... I would this with Dennis's solution code: ped - rep(1:3, c(4, 3, 3)) y - rnorm(10, 8, 2) # This replaces all of your sample() statements, and is equivalent:

Re: [R] ROCR package question for evaluating two regression models

2011-09-03 Thread Frank Harrell
It is not possible to have one cutoff point unless you have a very strange utility function. Nor is there a need for a cutoff when using a probability model. It is not advisable to compare models based on ROC area as this loses power. A likelihood-based approach is recommended. Frank Andra

[R] question with uniroot function

2011-09-03 Thread li li
Dear all, I have the following problem with the uniroot function. I want to find roots for the fucntion Fp2 which is defined as below. Fz - function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)} Fp - function(t){(1-Fz(abs(qnorm(1-(t/2)+(Fz(-abs(qnorm(1-(t/2)} Fp2 -

Re: [R] problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome

2011-09-03 Thread Maya Joshi
Let me clear my last part qt2 - qtd[-1:-2] # second function myfun2 - function(x) { vydv - sum(ydv)*0.25 sumD - sum(ydv * x) Rt - vydv / sumD return(Rt) } # ignoring grouping with ped, the following is output qt2 - apply(qtd, 2, myfun2) qtd1 - qt2[-1:-2] # The following result seems to pool at

[R] Loop with random sampling and write.table

2011-09-03 Thread Pete Pete
Hi! I need to perform this simple sampling function several hundred times: x1=as.character(rnorm(1000, 100, 15)) x2=as.character(rnorm(1000, 150, 10)) y1=as.data.frame(x1,x2) sample1=as.data.frame(sample(y1$x1, 12, replace = FALSE, prob = NULL)) sample1 write.table(sample1, sample1.txt, sep=

[R] help with glmm.admb

2011-09-03 Thread Elizabeth C Eadie
R glmmADMB question I am trying to use glmm.admb (the latest alpha version from the R forge website 0.6.4) to model my count data that is overdispersed using a negative binomial family but keep getting the following error message: Error in glmm.admb(data$total_bites_rounded ~

Re: [R] question with uniroot function

2011-09-03 Thread li li
Dear all, I forgot to mention the values for the parameters in the first email. u1 - -3 u2 - 4 alpha - 0.05 p1 - 0.15 Thank you very much. 2011/9/3 li li hannah@gmail.com Dear all, I have the following problem with the uniroot function. I want to find roots for the fucntion

Re: [R] Loop with random sampling and write.table

2011-09-03 Thread Jorge I Velez
Hi Pete Pete, Try # option 1 -- 100 files sapply(1:100, function(i){ x -sample(rnorm(1000, 100, 15), 12, replace = FALSE) write.table(x, paste(sample, i, .txt, sep = ), row.names = FALSE, quote = FALSE)) }) # option 2 -- all the information in one file d - replicate(100, sample(rnorm(1000,

Re: [R] rJava Installation Problems: 'cannot open compressed file 'rJava/DESCRIPTION', probable reason 'No such file or directory''

2011-09-03 Thread Uwe Ligges
Your internet connection is flaky, your first try just downloaded half the package, on the second try you got almost nothing (your output says 2519 bytes). So this is your connection rather than R or rJava. Uwe Ligges On 01.09.2011 15:37, R. Michael Weylandt wrote: Good Morning, I'm

Re: [R] question with uniroot function

2011-09-03 Thread Uwe Ligges
On 03.09.2011 18:31, li li wrote: Dear all, I forgot to mention the values for the parameters in the first email. u1- -3 u2- 4 alpha- 0.05 p1- 0.15 Thank you very much. 2011/9/3 li lihannah@gmail.com Dear all, I have the following problem with the uniroot function. I want

Re: [R] Hessian Matrix Issue

2011-09-03 Thread Uwe Ligges
I have not really looked into the details of the lengthy and almost unreadable code below. In any case, there are good reasons why numerics software typically uses Fisher scoring / IWLS in order to fit GLMs. And if your matrix is that singular, even the common numerical tricks may not

Re: [R] calling R from PHP error

2011-09-03 Thread Uwe Ligges
On 02.09.2011 08:23, Katerina Karayianni wrote: Hello, I am having the following error while calling an R script through PHP. /usr/local/bin/R: line 227: /kk/Programs/R-2.13.0/etc/ldpaths: Permission denied ERROR: R_HOME ('/kk/Programs/R-2.13.0') not found I had compiled R from source and

Re: [R] Classifying large text corpora using R

2011-09-03 Thread Daniel Malter
Take a look here: http://www.jstatsoft.org/v25/i05/paper HTH, Da. andy1234 wrote: Dear everyone, I am new to R, and I am looking at doing text classification on a huge collection of documents (500,000) which are distributed among 300 classes (so basically, this is my training data).

Re: [R] Hessian matrix issue

2011-09-03 Thread John C Nash
Unless you are supplying analytic hessian code, you are almost certainly getting an approximation. Worse, if you do not provide gradients, these are the result of two levels of differencing, so you should expect some loss of precision in the approximate Hessian. Moreover, if your estimate of

Re: [R] UNC Windows path beginning with backslashes

2011-09-03 Thread Henrik Bengtsson
[I found this message still sitting in my outbox - better late than never] Hi, it should have been K: instead of K in those examples. However, forget about what I said, because it (subst) turns out it will not work with UNC paths, cf. http://support.microsoft.com/kb/218740. Sorry for the noise

Re: [R] Saving a list as a Matrix

2011-09-03 Thread Pete Brecknock
wizykid wrote: Hi there. I went through the manual but I couldn't find a solution for my problem. I have list like this one : lst1 [[1]] [1] 0 1 2 3 [[2]] [1] 0 1 5 [[3]] [1] 2 3 4 and I want to save it as Matrix in Matlab mat format like : 0 1 2 3 0 1 5 0 2 3 4 0

[R] automathic bandwidth for multivariate local regression

2011-09-03 Thread Soberon Velez, Alexandra Pilar
Hi, I want to calculate the bandwith of a multivariate local polynomial regression such as the model is: Y=m(X,Z)+u. Please, somebody knows how I can do it in a multivariate case? In an univariate case I use the instrucction regband of the locfit package, but it is impossible to find a

[R] Saving a list as a Matrix

2011-09-03 Thread wizykid
Hi there. I went through the manual but I couldn't find a solution for my problem. I have list like this one : lst1 [[1]] [1] 0 1 2 3 [[2]] [1] 0 1 5 [[3]] [1] 2 3 4 and I want to save it as Matrix in Matlab mat format like : 0 1 2 3 0 1 5 0 2 3 4 0 can any body help me ? Appreciate your

[R] plot.validate.cph

2011-09-03 Thread Salvo Mac
Hi all! I'm trying to plot validate.cph. I have a problem because I'm collating several plots but I can't reduce the size of the plots otherwise the labels below the plot overlap.  If I remove the footnotes, I can add it in the main text.  How can I remove the footnotes i.e. stuff like

[R] glht (multcomp): NA's for confidence intervals using univariate_calpha

2011-09-03 Thread Ulrich Halekoh
Hej, Calculation of confidence intervals for means based on a model fitted with lmer using the package multcomp - yields results for calpha=adjusted_calpha - NA's forcalpha=univariate_calpha Example: library(lme4) library(multcomp) ### Generate data set.seed(8)

[R] about raw type

2011-09-03 Thread Luis Iván Ortiz Valencia
Dears I am searching information about how to use raw data, when it is used, didn't find to much information on R help. Any suggestion on links about this theme? atte -- Luis Iván Ortiz Valencia Doutorando Saúde Pública - Epidemiologia, IESC, UFRJ Estatístico Msc. Spatial Analyst Msc.

Re: [R] Saving a list as a Matrix

2011-09-03 Thread wizykid
Thank you so much Pete. Have a good one as you made mine -- View this message in context: http://r.789695.n4.nabble.com/Saving-a-list-as-a-Matrix-tp3788274p3788414.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Hessian Matrix Issue

2011-09-03 Thread dave fournier
I wonder if your code is correct? I ran your script until an error was reported. the data set of 30 obs was [1] 0 0 1 3 3 3 4 4 4 4 5 5 5 5 5 7 7 7 7 7 7 8 9 10 11 [26] 12 12 12 15 16 I created a tiny AD Model Builder program to do MLE on it. DATA_SECTION init_int

Re: [R] misclassification rate

2011-09-03 Thread Doussa
Thank you very much Patrick. -- View this message in context: http://r.789695.n4.nabble.com/misclassification-rate-tp3787075p3788456.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Problem with by statement for spaghetti plots

2011-09-03 Thread dadrivr
Hi, I am trying to apply the example at the bottom of the following page to my own data: http://128.97.141.26/stat/R/faq/spagplot.htm http://128.97.141.26/stat/R/faq/spagplot.htm The code from the example is: /tolerance-read.table(http://www.ats.ucla.edu/stat/R/faq/tolpp.csv,sep=,;, header=T)

[R] Bootstrapping a covariance matrix

2011-09-03 Thread meddee
Dear all I am a bit new to R so please keep your swords sheathed! I would simply like to bootstrap a covariance matrix from a multivariate gaussian density. At face value that seemed like a very straightforward problem to solve but I somehow could not get the boot package to work and did not

Re: [R] Saving a list as a Matrix

2011-09-03 Thread Henrique Dallazuanna
Try this: t(sapply(lst1, '[', 1:max(sapply(lst1, length On Sat, Sep 3, 2011 at 3:37 PM, wizykid wizy@gmail.com wrote: Hi there. I went through the manual but I couldn't find a solution for my problem. I have list like this one : lst1 [[1]] [1] 0 1 2 3 [[2]] [1] 0 1 5 [[3]]

[R] Change properties of line summary in interaction.plot

2011-09-03 Thread dadrivr
Is it possible to change the color/thickness of the summary line in an interaction.plot without changing the other individual data lines? I would like to make the line from the summary function (mean) the color red and thicker than the surrounding black lines. How can I do that? Here is a link

[R] Lmer plot help

2011-09-03 Thread drewmac
Hello all I'm running the lme4 package on my binomial data, and I'm happy with the model and the resultant plot. However, I'd like to plot my table data, which has: two IVs, and one DV. You can see an example below, where 'attractive' = question (IV), male = condition(IV/predictor) and no/yes =

[R] sd help

2011-09-03 Thread novis
Hello, I am getting a strange error while computing standard deviation. If the do the following I get the answer NA NA. Any help??? Thank you so much. a- cbind() a- cbind(a, 5) a- cbind(a, 7) print(sd(a)) If I compute the mean it works fine though i.e., print(mean(a)) works just fine.

Re: [R] sd help

2011-09-03 Thread Joshua Wiley
Hi, You are not getting an error. You are getting the standard deviation of the columns as clearly described in the documentation. Cheers, Josh On Sat, Sep 3, 2011 at 5:00 PM, novis kaushik.sinha...@gmail.com wrote: Hello, I am getting a strange error while computing standard deviation. If

[R] AICc function with gls

2011-09-03 Thread Roland Sookias
Hi I get the following error when I try and get the AICc for a gls regression using qpcR: AICc(gls1) Loading required package: nlme Error in n/(n - p - 1) : 'n' is missing My gls is like this: gls1 Generalized least squares fit by REML Model: thercarnmax ~ therherbmax Data: NULL

Re: [R] AICc function with gls

2011-09-03 Thread Roland Sookias
Just realized was because I had an object called AICc. On Sun, Sep 4, 2011 at 2:08 AM, Roland Sookias r.sook...@gmail.com wrote: Hi I get the following error when I try and get the AICc for a gls regression using qpcR: AICc(gls1) Loading required package: nlme Error in n/(n - p - 1) :

[R] Markov Switching GARCH Package

2011-09-03 Thread Jumlong Vongprasert
Deal All I want to use MSGARCH for my data. What package I will used. Many THanks -- Jumlong Vongprasert Assist, Prof. Institute of Research and Development Ubon Ratchathani Rajabhat University Ubon Ratchathani THAILAND 34000 [[alternative HTML version deleted]]

[R] Test for Random Walk and Makov Process

2011-09-03 Thread Jumlong Vongprasert
Dear All I want to test my data for Random Walk or Markov Process. How I can do this. Many Thanks -- Jumlong Vongprasert Assist, Prof. Institute of Research and Development Ubon Ratchathani Rajabhat University Ubon Ratchathani THAILAND 34000 [[alternative HTML

[R] what is wrong with my quicksort?

2011-09-03 Thread warc
Hey guys, I tried to program quicksort like this but somethings wrong. please help partition - function(x, links, rechts){ i - links j - rechts t - 0 pivot - sample(x[i:j],1) while(i = j){

Re: [R] Classifying large text corpora using R

2011-09-03 Thread andy1234
Daniel Malter wrote: Take a look here: http://www.jstatsoft.org/v25/i05/paper HTH, Da. andy1234 wrote: Dear everyone, I am new to R, and I am looking at doing text classification on a huge collection of documents (500,000) which are distributed among 300 classes (so

Re: [R] what is wrong with my quicksort?

2011-09-03 Thread Jim Holtman
have you tried to debug it yourself. All you said is that 'it went wrong'. that is not a very clear statement of the problem. If I were to start looking at it, I would put some print statements in it to see what is happening on eachpath and with each set of data. Have you tried this? Sent

Re: [R] what is wrong with my quicksort?

2011-09-03 Thread Mark Leeds
Hi: I looked it up in google because I couldn't remember how quicksort worked. ( i'm getting old ). the java code is below. I didn't translate it but what you are doing incorrectly is calling partition recursively when you need to call the quicksort algorithm recursively. you'll see what I mean

Re: [R] Test for Random Walk and Makov Process

2011-09-03 Thread Ken
For random walk, there are entropy based tests (Robinson 1991), or you could empirically test the hypothesis by generating random normal data with the same mean and standard deviation and looking at the distribution of your quantiles. You could make generic statements also about whether or not

Re: [R] about raw type

2011-09-03 Thread Jeff Newmiller
Raw data could mean many different things to different people. You need to be more specific about what YOU mean when you use that term. --- Jeff Newmiller The . . Go Live... DCN:jdnew...@dcn.davis.ca.us Basics: ##.#.

[R] Regression coefficient constraints

2011-09-03 Thread andre bedon
Hi Guys, Does anyone know how I could constrain my regression coefficients so that they are positive and add up to one? Any help will be greatly appreciated. Kind Regards, Andre [[alternative HTML version deleted]]