Re: [R] Hacked

2018-04-17 Thread Roslina Zakaria
Mee too got nasty email after i responded the r help email. Sent from my Sony Xperia™ smartphone Sariya, Sanjeev wrote >I've been receiving nasty e-mails too. No g-mail, but official/work e-mail >address. > >-Original Message- >From: R-help On

Re: [R] Help with R-Calling forth csv.

2018-04-16 Thread Roslina Zakaria
Hi, You may use the keyword to google for what you want to do to start with. Slowly you will learn...this forum is,really helpful but we should provide or show some effort..all the best! I like this forum very much and always feel thankful to very helpful and committed members. Sent from my

Re: [R] Reading S-plus data in R

2017-02-24 Thread Roslina Zakaria
It should be .sdd Sent from my Sony Xperia™ smartphone Bert Gunter wrote >I see ".ssd" in your message and ".sdd" in your read.S () invocation... > >-- Bert >Bert Gunter > >"The trouble with having an open mind is that people keep coming along >and sticking things into it." >-- Opus

Re: [R] Kolmogorov-Smirnov Test

2013-08-02 Thread Roslina Zakaria
Subject: Re: [R] Kolmogorov-Smirnov Test On Aug 2, 2013, at 03:24 , Roslina Zakaria wrote: Dear r-users,   I am using KS test to test the goodness of fit for my data and the got the following output.  However, I don't understand about the warning messages.  What does it mean

[R] Kolmogorov-Smirnov Test

2013-08-01 Thread Roslina Zakaria
Dear r-users,   I am using KS test to test the goodness of fit for my data and the got the following output.  However, I don't understand about the warning messages.  What does it mean by horizontals is not a graphical parameter   Thank you so much for any help given and it is very much

[R] construct stem and leaf plot

2013-07-19 Thread Roslina Zakaria
Dear r-users,   I would like to construct tem and leaf plot using iris data. It should be easy, but I don't understand why the plot is not right.   Thank you so much for your help.   dat - iris[,1] stem(dat) The decimal point is 1 digit(s) to the left of the | 42 | 0 44 | 46 | 00 48

[R] error message in gev

2013-07-17 Thread Roslina Zakaria
  Hi r-users,   I would like to use gev and my data (annual rainfall ) is as follows:   head(dat,20) ABCDEFGHI J 1 45.1 41.5 58.5 50.1 46.0 49.1 37.7 49.1 59.8 54.0 2 50.3 39.8 49.4 56.4 49.4 48.8 42.1 49.8 49.4 58.3 3 41.7 39.3 44.6 39.1 35.7 41.5 40.8

[R] Fw: error message in gev

2013-07-17 Thread Roslina Zakaria
- Forwarded Message - From: Rui Barradas ruipbarra...@sapo.pt To: Roslina Zakaria zrosl...@yahoo.com Cc: 'r-help' r-help@r-project.org Sent: Wednesday, July 17, 2013 8:49 PM Subject: Re: [R] error message in gev Hello, It's better if you Cc the list, the odds of getting more

Re: [R] error message in gev

2013-07-17 Thread Roslina Zakaria
better if you Cc the list, the odds of getting more and better answers are greater. Have you tried with different block values? Rui Barradas Em 17-07-2013 13:33, Roslina Zakaria escreveu: Hi Rui, Yes, I am using gev from 'evir' install.packages(evir) library(evir) I have tried your suggestion

Re: [R] error message in gev

2013-07-17 Thread Roslina Zakaria
, And what if you try it without a block value? out.list - lapply(dat, gev) Rui Barradas Em 17-07-2013 14:53, Roslina Zakaria escreveu: Hi Rui, I have tried different block values and below are the error message I got: out - gev(dat, A) Error in as.POSIXlt.default(attributes(data)$times) :     do

[R] Missing data

2013-04-25 Thread Roslina Zakaria
Dear r-users, I would like to investigate about how to fill in missing data.  I started with a complete data and try to introduce missing data into the data series.  Then I would use some method to fill in the missing data and then compare with the original data how good it is.  My question

[R] split data into columns from dataframe

2013-03-12 Thread Roslina Zakaria
Dear r-users,   Originally my data is in notepad.  I use data.frame(...) to convert the data into columns but it has no header.  The data below is what I got in R.  I would like to extract these data:   19710629    39.3  19701126  19720629    33.8  19720517 ... when I use data2_30min[1,

[R] fill colour in grid

2013-02-13 Thread Roslina Zakaria
Dear all r-users,   I have this code below to draw two squares, small and big square.  I would like to colour the small square with red and the big square with blue for example.  I tried using polygon but fail.  Thank you so much for your help.     par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs=i,

[R] compare and count data

2013-01-20 Thread Roslina Zakaria
Dear r-users,   I have these data below:   I would like to compare each column with a certain value and count how many in each column less than that specified value.    odd column (1,3,5) will compare with 1.61 and even column (2,4,6) will compare with 75 and I would like to count how many for

[R] Tinn-R and R problem

2013-01-18 Thread Roslina Zakaria
Dear r-users,   Actually, this is not a big problem, however it is a bit annoying.  Everytime I want to use Tinn-R and R. I have to do this step first before I can excute a set of R codes:   R-- configure -- temporarily (current session)   if not it will give this message:   .trPaths -

[R] Extract data in word pad

2013-01-12 Thread Roslina Zakaria
Dear r-users,   I have saved data in word pad.  I would like to extract certain part of data only, for example   19710629 08(PARTIAL) 39.3 at interval beginning 19701126 010326 19720629 08(PARTIAL) 33.8 at interval beginning 19720517 144507 19730629 08(PARTIAL) 32.2

[R] arrange data

2012-11-11 Thread Roslina Zakaria
Dear r-users,   I have daily rainfall data from 1971 to 2000.  I would like to extract november and december data only.  I would also like to do column bind for november and december, therefore I would like to delete 31 December from december data so that the length of november and december are

[R] arrange data

2012-10-05 Thread Roslina Zakaria
Dear r-users, I have dailly rainfall data from year 1971 to 2000. I use aggregate to form monthly rainfall data.  What I don't understand is that the data for the year 2000 become on the top, instead of year 1971.  Here are some codes and output: agg_dt1     -

[R] extract data

2012-04-04 Thread Roslina Zakaria
HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3   ( a single nonzero data between zeros data) data_2: 3.1, 2.5, 2.1,1.4   ( two nonzero data between zeros

[R] extract data

2012-04-04 Thread Roslina Zakaria
HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3   ( a single nonzero data between zeros data) data_2: 3.1, 2.5, 2.1,1.4   ( two nonzero data between

[R] Thank you

2011-10-28 Thread Roslina Zakaria
Dear r-community, Today I have completed my PhD.  I would like to take this opportunity to thank the r-community for helping me with the r-coding.  I use r to do data manipulation during my PhD and I benefit a lot through the discussion in the r-forum. I will continue using R and help the

[R] R is not running well

2010-12-20 Thread Roslina Zakaria
Hi, I'm working on windows 7.  Recently I install the latest R and also use together with Tinn-R but it is not working well.  I got the following message.  I have tried saving the Rprofile as suggested by the R forum, but still it is not running.  What should I do? source(.trPaths[5],

Re: [R] overlap cdf plots and add colors and etc

2010-11-25 Thread Roslina Zakaria
...@gmail.com; r-help@r-project.org r-help@r-project.org Sent: Fri, November 26, 2010 12:52:56 AM Subject: Re: [R] overlap cdf plots and add colors and etc On 2010-11-24 22:24, Roslina Zakaria wrote: Hi Jorge, I tried but still it does not work.  Thank you for your time. Jorge's code works

Re: [R] overlap histogram and density

2010-11-25 Thread Roslina Zakaria
Subject: Re: [R] overlap histogram and density [OOPS!!I accidentally reproduced my second example below as my third example. Now corrected. See below.] On 11-Nov-10 20:02:29, Ted Harding wrote: On 11-Nov-10 18:39:34, Roslina Zakaria wrote: Hi, Does anybody encounter the same problem when we

[R] overlap cdf plots and add colors and etc

2010-11-24 Thread Roslina Zakaria
Hi r-users, I would like to overlap 2 ecdf plots.  I tried this below and it gives me two plots of ecdf but just both just in black. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs=i, yaxs=i) plot(ecdf(datobs)) lines(ecdf(gam_sum_gen)) Then I try to add colors etc and also the legend but fail.

Re: [R] overlap cdf plots and add colors and etc

2010-11-24 Thread Roslina Zakaria
, Try par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs=i, yaxs=i) plot(ecdf(rnorm(100))) plot(ecdf(rnorm(100)), add = TRUE, col = 2) HTH, Jorge On Thu, Nov 25, 2010 at 12:18 AM, Roslina Zakaria wrote: Hi r-users, I would like to overlap 2 ecdf plots.  I tried this below and it gives me two plots

[R] need smooth cdf lines

2010-11-21 Thread Roslina Zakaria
Hi, I would like to overlap the cdf curve for observed and generated data  Here is my code: plot(cdf,main =CDF of the sum for winter season-Hume,cex.axis=1.2,xlab=Rainfall (mm), xaxs=i,yaxs=i,col=c(black,red), lty=c(1,1),ylab=Cumulative probability, xlim=c(0,800),lwd=1) lines(ecdf(datobs))

[R] plot start at origin

2010-11-21 Thread Roslina Zakaria
Hi r-users, I would like my axes to intersect at (0,0).  I tried  xaxs=i,yaxs=i but it does not change anything.  I hope anybody can help me with this problem.  Here is my code. hist(datobs, prob=TRUE, main =PDF of the sum of two stations,col=yellowgreen, cex.axis=1.2, xlab=Rainfall (mm),

[R] solve nonlinear equation using BBsolve

2010-11-20 Thread Roslina Zakaria
Hi r-users, I would like to solve system of nonlinear equation using BBsolve function and below is my code.  I have 4 parameters and I have 4 eqns. mgf_gammasum - function(p) { t  - rep(NA, length(p)) mn - 142.36 vr - 9335.69 sk - 0.8139635 kur - 3.252591 rh  - 0.896 # cumulants k1 -

[R] overlap histogram and density

2010-11-11 Thread Roslina Zakaria
Hi, Does anybody encounter the same problem when we overlap histogram and density     that the density line seem to shift to the right a little bit?           If you do have the same problem, what should we do to correct that?           Thank you.           par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))  

[R] extract month data automatically

2010-09-02 Thread Roslina Zakaria
Hi, I would like to extract monthly data automatically using a code.  Given are my sample data. I know how to do one by one: jan_data1 - Pooraka_data[Pooraka_data$Month==1,4] feb_data1 - Pooraka_data[Pooraka_data$Month==2,4] mar_data1 - Pooraka_data[Pooraka_data$Month==3,4] apr_data1 -

[R] which one give clear picture-pdf, jpg or tiff?

2010-08-19 Thread Roslina Zakaria
Hi, I need some opinion.  I would like to use graph that I generate from R code and save it into word document.  Which format is better? pdf, jpeg or tiff? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org

[R] barplot and x-axis font size

2010-08-04 Thread Roslina Zakaria
Hi all, I would like to draw a side by side bar plot.  How can I adjust the the font size for the x-axis?  Furthermore, I'm not sure what to write for 'at=?'.  I tried cex.axis and cex.lab but still fail.  Here is my data and code:   t(all)    0-100 100-150  150-200 200-250 250-300

[R] Kolmogorov-Smirnov test, which one to use?

2010-08-04 Thread Roslina Zakaria
Hi, I have two sets of data, an observed data and generated data. The generated data is obtained from the model where the parameters is estimated from the observed data. So I'm not sure which to use either one-sample test ks.test(x+2, pgamma, 3, 2) # two-sided, exact or two-sample test

[R] anderson-darling test

2010-07-27 Thread Roslina Zakaria
Hi, I have the binned data (observed and generated from model)  that I would like to test using the anderson-darling goodness of fit test.  But I'm not sure which package in R to use. I tried ad.test(...) but it does not recognise the test by Vito Ricci in FITTING DISTRIBUTIONS WITH R  

[R] sapply or apply

2010-06-16 Thread Roslina Zakaria
Hi r-users, I have this code here : dt   - winter_pos_sum bt   - c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  - c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_min  - min(bt) ; bt_min p   - alp_sum    ; p t  - 50 t1 - t+1     #first get the sum over the

[R] how to use sapply code

2010-06-16 Thread Roslina Zakaria
Hi, I have this code here and try to use sapply code.  But I got error message that I don't really understand to correct. bt   - c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  - c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_alp - data.frame(bt,alp) sapply(bt_alp,

[R] error message fitting tcopula

2010-06-10 Thread Roslina Zakaria
Hi r-users,   I really need help in fitting the t-copula.  I try to reproduce the example given by Jun Yan in “Enjoy the joy of copula” but I’m not sure how to correct the error based on the error message.  I tried so many ways but still could not get it working.   loglik.marg -

[R] fitting t copula

2010-06-09 Thread Roslina Zakaria
Hi r-users, I try to fit the t copula using the gamma marginals.  But I got error message which I don't really understand. Thank you for any help given. myCop.t - ellipCopula(family = t, dim = 2, dispstr = toep, param = 0.5, df = 8) myCop.t myMvd - mvdc(copula = myCop.t, margins = c(gamma,

[R] horizontal and vertical line with arrow in a plot

2010-06-03 Thread Roslina Zakaria
Hi r-users, I would like to add a plot of vertical line segment with arrow from (77,.6) to (77,0) and also a horizontal  line segment with arrow from (0,0.6) to (77,.6) .  So far this is what I have: plot(sq, cdf, type=l, lwd=4,col=blue,xaxs=i,yaxs=i, xlab= Rainfall (mm), ylab= Random no.,

[R] arrange data

2010-05-31 Thread Roslina Zakaria
Hi r-users,   I have a data below but I would like to rearrange my data so that it will be in the following format: year, month, day, rain.  I also would like the data to be arranged so that it will be continues for example year 1939 it will go from january 1 to december 31 and continue with

[R] something like vlookup in R?

2010-05-27 Thread Roslina Zakaria
Hi r users,   I would like sort of   cdf         seq   rand 0.00E+00    0 0.262123478 1.56E-03    20    0.964293344 1.55E-02    40    0.494827113 5.30E-02    60    0.733726005 1.16E-01    80    0.800408948 1.97E-01    100   0.925748466 2.88E-01    120   0.047578356 3.80E-01    140  

[R] vlookup in R?

2010-05-27 Thread Roslina Zakaria
Hi R-users,   I would like to search for the values of seq that match my rand values.  In excel I will use =VLOOKUP(G2,$E$2:$F$32,2).  For example, for rand=.262 it will give me approximately seq=120 and rand=0.964293344, seq=460 and etc.   E   F G cdf         seq   rand 0.00E+00   

[R] sum of certain length

2010-05-23 Thread Roslina Zakaria
Hi r-users,   I have this data below.  I would like to obtain the weekly rainfall sum.  That is I would like to find sum for day 1 to day 7, day 8 - day15, and so on.    year month day rain 1  1922 1   1  0.0 2  1922 1   2  0.0 3  1922 1   3  0.0 4  1922 1   4  0.0 5  1922 1  

[R] sapply code

2010-05-16 Thread Roslina Zakaria
Hi r-users,   I have this code here, but I just wonder how do I use 'sapply' to make it more efficient lamda_cor - eigen(winter_cor)$values   lamda_cor [1] 1.3459066 1.0368399 0.8958128 0.7214407   lamda_cxn - function(dt) { n   - length(dt)   term    - vector(length=n, mode=numeric)    

[R] kernel density to smooth plots

2010-05-10 Thread Roslina Zakaria
Hi r-sers, I have a data of relative frequencies for the interval of 0-20, 20-40,...380-400.  I would like the two data on the same graph using the same x-axis label.  My question is how to get a smooth curve using kernel density code if it possible for this data.   cbind(rel_obs,rel_gen)

[R] smooth line overlap with histogram

2010-05-06 Thread Roslina Zakaria
Hi r-users,   I would like to overlap a smooth line on the histogram.  I tried using spline but it does not work. sq - seq(0,900,by=50) sq.50  - as.character(sq) datobs - sum_pos ## first, plot histogram histo - hist(datobs,breaks=sq,freq=F) ## extract counts from histogram and calculate

[R] BB package

2010-04-28 Thread Roslina Zakaria
Hi I would like to solve a system of nonlinear equations below using dfsane function   mn - 142.36; vr - 9335.69 ; sk - 0.81;  kur - 0.25 test_fn - function(p) {    f - rep(NA, length(p))     f[1] - p[1]*(p [2]+p[3])- mn   f[2] - - vr + 2*p[1]*p[2]*p[3]*(p[4]-1)+p[1]*(p[2]+p[3])^2   f[3] - -

[R] barplot and line

2010-03-31 Thread Roslina Zakaria
Hi r-users,   I have this data below and would like to plot a barplot overlap with a line. This is my data: hist_50     pdf_obs pdf_gen.50 1  0.00   0.00 2  0.083156   0.125366 3  0.132196   0.158230 4  0.126866   0.149432 5  0.120469   0.127897 6  0.121535   0.104096 7  0.103412  

[R] (no subject)

2010-03-30 Thread Roslina Zakaria
Hi r-users,   I would like to display my legend with fill box and line symbol.  The first color will be in the box and the second colour will just be a line.   legend(topright, c(observed,gamma sum fit), col= c(greenyellow,red),pch=c(15, NA),lty = c(0,1),lwd=2)   Is it possible?   Thank

[R] any quick way to write this label

2010-03-28 Thread Roslina Zakaria
Hi r-users,   Is there any quick way to write this label?   c(0,50,100,150,200,250,300,350,400,450, 500,550,600,650,700,750,800,850,900)   Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] recursive term

2010-03-16 Thread Roslina Zakaria
Hi r-users;   I have this values: eign_val - c(137.810447,3.538721,2.995161,1.685670) alp    - 1.6549 ;  lamda - eign_val lamda_m - min(lamda)   First I calculated manually: delta0 - 1 delta1 - alp*delta0*(4-lamda_m*(1/lamda[1]+1/lamda[2]+1/lamda[3]+1/lamda[4]))  delta1 delta2 -

[R] empirical copula code

2010-03-03 Thread Roslina Zakaria
Hi all, I have this data set: ## Empirical copula ## dt1 = ranking ## dt2 = observed uniform data associated with the ranking   Sample data, dt1     S_i   R_i  [1,]   7.0  10.0  [2,] 232.5 440.5  [3,] 143.0 141.5  [4,] 272.5 222.0  [5,]  46.0  34.0  [6,] 527.0 483.0  [7,] 420.5 563.5  [8,] 

[R] code for empirical copula

2010-03-02 Thread Roslina Zakaria
Hi,   I hope somebody can give me an idea where can I can find the code for empirical copula. I have a bivariate data.   Thank you so much for your help. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] vloopkup or search function

2010-02-21 Thread Roslina Zakaria
Hi,   Does R has something similar  to vlookup function in excel?   Thank you for the info. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] 2 ecdf from different set of data

2010-02-18 Thread Roslina Zakaria
Hi r-users,   I have 2 sets of data and I would like to superimpose this cumulative density in one graph.   I know how to put the 2 graphs in one same graph but my problem is the data are different.   z[1:20]  [1]  2.02347388  3.19514379  0.05188875  1.41333812  3.50249892  4.34272676 

[R] color graph in multiple plots

2010-02-18 Thread Roslina Zakaria
Hi,   I would like to distinguish my plots using colors but I got error message.  How do I correct that?     plot(ecdf(z), main =CDF for observed and simulated weighted sum,type=l,lwd=2,col=blue, xlab=Weighted sum (mm), ylab=Cumulative Percent, xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))

[R] extract the data that match

2010-02-16 Thread Roslina Zakaria
Hi r-users,   I would like to extract the data that match.  Attached is my data: I'm interested in matchind the value in column 'intg' with value in column 'rand_no' cbind(z=z,intg=dd,rand_no = rr)     z  intg rand_no    [1,]  0.00 0.000   0.001    [2,]  0.01 0.000   0.002    [3,]  0.02

[R] error message error

2010-02-14 Thread Roslina Zakaria
Hi r-users,   I hope somebody can help me to understand the error message.  Here is my code; ## Newton iteration newton_gam - function(z) { n   - length(z)   r   - runif(n)   tol - 1E-6   cdf - vector(length=n, mode=numeric)   fprime - vector(length=n, mode=numeric)   f   - vector(length=n,

[R] looping problem

2010-02-12 Thread Roslina Zakaria
Hi r-users,   I have this code below but I don't understand the error message:   cumdensity - function(z) { alp  - 2.0165;   rho  - 0.868;   # simplified expressions   a  - alp-0.5   c1 - sqrt(pi)/(gamma(alp)*(1-rho)^alp)   c2 - sqrt(rho)/(1-rho)   t1 - exp(-z/(1-rho))   t2     -

[R] how to adjust the output

2010-02-09 Thread Roslina Zakaria
Hi R-users,   I have this code below and I understand the error message but do not know how to correct it.  My question is how do I get rid of “with absolute error 7.5e-06” attach to value of cdf so that I can carry out the calculation.   integrand - function(z) { alp  - 2.0165  

[R] For and while in looping

2010-02-09 Thread Roslina Zakaria
I would like to solve a nonlinear eqn using newton method and here is the code:   library(numDeriv)   fprime - function(z) { alp  - 2.0165;   rho  - 0.868;   # simplified expressions   a      - alp-0.5   c1     - sqrt(pi)/(gamma(alp)*(1-rho)^alp)   c2     -

[R] looping problem

2010-02-09 Thread Roslina Zakaria
Hi R-users,   I have this code here: library(numDeriv)   fprime - function(z) { alp  - 2.0165;   rho  - 0.868;   # simplified expressions   a  - alp-0.5   c1 - sqrt(pi)/(gamma(alp)*(1-rho)^alp)   c2 - sqrt(rho)/(1-rho)   t1 - exp(-z/(1-rho))   t2 - (z/(2*c2))^a   bes1   -

[R] problem with Tinn-R

2010-02-07 Thread Roslina Zakaria
Hi, I install Tinn-R 2.3.4.4 and when I want to execute the calculation, it gives me this error:   The preferred Rterm not defined.   Thank you so much for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Problem to install Tinn-R_2.3.4.4

2010-01-28 Thread Roslina Zakaria
Hi r-users,   I manage to install the Tinn-R_2.3.4.4 successfully.  However, I cannot the execute my code and cannot open that window and get this message:   The preferred Rterm was not defined   and it suggest 'Options/main/R//path/Gui'.  What that mean and how to do it.   Thank you so mcuh

[R] Check out this photo on MyDailyFlog!

2010-01-26 Thread Roslina Zakaria
Hello!!! I just uploaded a photo on zroslina's DailyFlog page that I want you to see. Check out: http://www.mydailyflog.com/go/invite_register/zroslina/56282492 Cheers! Got a digital camera? MyDailyFlog is a personal photo-blogging space where you

[R] Newton method

2010-01-26 Thread Roslina Zakaria
Hi r-users,   I hope somebody can help me with this code. I would like to solve for z values using newton iteration method.  I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn.  There seem to be some output but what I expected is a

[R] I just uploaded a photo that I want you to see!

2010-01-26 Thread Roslina Zakaria
Hello! I just uploaded a photo on zroslina's DailyFlog page that I want you to see. Please come and see: http://www.mydailyflog.com/go/invite_register/zroslina/56282492stc=18 Thanks! Roslina Zakaria Got a digital camera? MyDailyFlog is a personal

[R] newton method for single nonlinear equation

2010-01-25 Thread Roslina Zakaria
Hi r-users,   I would like to solve for z values using newton iteration method.  I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn.  There seem to be some output but what I expected is a vector of z values.  Thank you so much for any

[R] Error meaning

2010-01-20 Thread Roslina Zakaria
Hi r-users,   I have the following code to solve 4 simultaneous eqns with 4 unknowns using newton iteration method.  But I got the error message:   pars - c(1.15, 40, 50, 0.78) newton.input2 - function(pars) {  ## parameters to estimate      alp - pars[1]    b1  - pars[2]     b2  - pars[3]   

[R] superimpose histogram and fitted gamma pdf

2010-01-20 Thread Roslina Zakaria
Hi r-users,   I try to draw histogram (in terms of probabilty) and superimpose with the gamma pdf. Using this code below I can get the plots BUT the y scale for the density is out of scale.  How do I change the y-axis scale to max 1?  Another thing, how I do draw smooth line rather that points?

[R] Bootstrap for correlation coefficient

2010-01-13 Thread Roslina Zakaria
I have the following code:   ## to check correlation between the simulated uniform data x2 - uni[,1] ; x2[1:10] y2 - uni[,2] ; y2[1:10] result2 - boot(cbind(x2,y2), f, 20) # get 95% confidence interval boot.ci(result2, type=bca) cor.test(x2,y2, method=pearson, conf.level=0.95)   part of my data:  

[R] decimal value for p-value

2010-01-06 Thread Roslina Zakaria
Dear r-users,   I conducted a chi-square test using chi.test code and found that my p-value = 1.  My question is, is it possible to get the decimals form of the p-value?  Maybe the p-value is actually 0. before rounding the value.   thank you so much for any help given.  

[R] test of proportions

2009-12-29 Thread Roslina Zakaria
Hi r-users,   I would like to use prop.test code and I also calculate manually to test the proportions for 2 groups.  The problem is the answer for the p-value calculated manually are different from prop.test.  Here are the results:   ## Manually   z value: z= (phat-p)/sqrt(pq/n) =

[R] change the scale of grid lines in a plot

2009-12-16 Thread Roslina Zakaria
Hi,   I would like to change a scale of the grid lines in a plot.  I can see the default is 0.2, so how do I change to 0.1?   Thank you so much for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] draw a box at 10% lower and upper in scatter plot

2009-12-01 Thread Roslina Zakaria
Hi,   I would like to draw a box at each corner of lower 10% and upper 10% in the scatter plot on(0,1)*(0,1)  to indicate the lower and upper tail.  I hope somebody can help me.   Here is my code: ## scatter plot plot(hume_uni[,2],beec_uni[,2], pch=19, xlab=Hume_uni, ylab=Beec_uni, col= blue) 

[R] Titles in plots overlap

2009-11-24 Thread Roslina Zakaria
Hi,   I use fCopulae package to draw different graphs of univariate and bivariate skew t.  But the plots titles overlap.  I tried using cex.main, font.main to adjust the size but they still overlaps.  Here is my code: par(mfrow = c(3, 1)) mu = 0 Omega = 1 alpha1 = 0 alpha2 = 1.5 alpha3 = 2

[R] Kolmogorov smirnov test

2009-10-12 Thread Roslina Zakaria
Hi r-users,   I would like to use Kolmogorov smirnov test but in my observed data(xobs) there are ties.  I got the warning message.  My question is can I do something about it?   ks.test(xobs, xsyn)       Two-sample Kolmogorov-Smirnov test data:  xobs and xsyn D = 0.0502, p-value = 0.924

[R] numerical integration

2009-09-10 Thread Roslina Zakaria
Hi r-users,   Can I do a numerical integration in R to solve for F(z)- integral_0^z {f(t) dt} = 0 where F(z) is the CDF and f(t) is the pdf?  What package can I use?   Thank you so much for any help given. [[alternative HTML version deleted]]

[R] Plot 2 ecdf in one graph

2009-09-06 Thread Roslina Zakaria
Hi r-users,   I would like to compare the cdf between historical and predicted. My x.obs and x.pre are the frequency data in classes of 0-300. I tried: plot(ecdf(x.obs),ecdf(x.pre),type=l,col=red)   and it gives me: Error in plot.stepfun(x, ..., ylab = ylab, verticals = verticals, pch = pch) :

[R] (no subject)

2009-09-06 Thread Roslina Zakaria
Hi r-users,   I would like to know how to put all the data that is greater than certain value in certain cell for my histogram.  For example, since maximum value of p1 is 588 it doesn't fit in the breaks that we specified.  Can we write breaks 300?   max(p1[,2]) pre.hist - hist(p1[,2],breaks =

[R] detach and install package

2009-07-16 Thread Roslina Zakaria
Hi R-users, I would like to detach and installed the fBasics package but it gives me this message: detach(package:fBasics,unload=TRUE) Error in detach(package:fBasics, unload = TRUE) : invalid name install.packages(repos=NULL,pkgs=c:\\Tinn-R\\fBasics_2100.77.zip) package 'fBasics'

[R] evaluate sum of sum

2009-07-15 Thread Roslina Zakaria
Hi R-users, Could anybody show me how to write a code to evaluate sum(z[i] + sum(k[j]*(z[i])^(k[j])), i=1 to 4, j=0 to infinity) ? Thank you so much for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org

[R] transform multi skew-t to uniform distribution

2009-07-06 Thread Roslina Zakaria
Hi R-users,  I have a data from multi skew t and would like to transform each of the data to uniform data.  I tried using 'pmst' but only got one output:   rr1 - as.vector(r1);rr1  [1]  0.7207582  5.2250906  1.7422237  0.5677233  0.7473555 -0.6020626 -2.1947872 -1.1128313 -0.6587316 -1.1409261  

[R] tail probability

2009-06-24 Thread Roslina Zakaria
Hi r-users, If I have 10 data generated from multi skew-t distribution, how do I find the tail probability of alpha=.01? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] looping problem

2009-06-23 Thread Roslina Zakaria
Hi R-users,   I have this code below and use some code from sn package for multivariate skew t (rmst) to generate a set of random numbers.   I try to do a looping to produce ‘rand’ for different values of degrees of freedom (degf).  Actually, I’m not sure how to specify the

[R] (no subject)

2009-05-31 Thread Roslina Zakaria
Hi R-users, I try to use sn package but it give me the following message: install.packages(repos=NULL,pkgs=c:\\Tinn-R\\sn_0.4-12.zip) Warning: package 'sn' is in use and will not be installed updating HTML package descriptions I did tried a few time to save the .zip file but it give me the

[R] Asymmetric t-copula code?

2009-05-20 Thread Roslina Zakaria
Hi R-users, Anybody got any idea where can I find the code for asymmetric t-copula? I found the copula package written by Jun Yan. Thank you so much for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Asymmetric t - copula code in R

2009-05-17 Thread Roslina Zakaria
Hi R-users, Where can I find the code for asymmetric t-copula in R? Thank you for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] asymmetric t-copula in R

2009-05-17 Thread Roslina Zakaria
Hi R-users, Where can I find the code for asymmetric t-copula in R? Thank you for any help given. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] data transformation using gamma

2009-05-07 Thread Roslina Zakaria
Hi R-users, I have this code to uniformise the data using gamma: length(dp1) [1] 696 dim(dp1) [1] 58 12 dim(ahall) [1]  1 12 dim(bhall) [1]  1 12 trans_dt - function(dt,a,b) + { n1 - ncol(dt) +   n2 - length(dt) +   trans  - vector(mode='numeric', length=n2) +   dim(trans) - dim(dt) +  

[R] need help - small code

2009-05-01 Thread Roslina Zakaria
Hi R-users,   I would like to transform my data using gamma, my data are ahll, bhall and dp1 as shown below:   ahall      ah1  ah2  ah3  ah4  ah5  ah6  ah7  ah8  ah9 ah10 ah11 ah12 [1,] 0.9 1.01 1.24 1.85 1.85 2.45 3.67 3.02 3.06 2.33 1.86 0.96   bhall        bh1   bh2 

[R] estimate alpha beta for gamma

2009-04-29 Thread Roslina Zakaria
Hi R-users, I'm not sure what's wrong and how do I check the error? I have 3 sets of data aug_dt1  [1]  22.8  49.6  77.9  67.6  91.2  48.9 124.6  54.6  85.8  62.8  63.3 174.7  32.3  22.7  99.9 123.2   4.8 149.0  66.0 [20]  73.9  37.4  22.4  69.5  87.3  66.9  87.2  81.5 109.1  47.4  22.8 

[R] Tinn-R and latex

2009-04-24 Thread Roslina Zakaria
Hi R-users, I installed new version of R and Tinn-R and I just wonder why all my latex document change to Tinn-R symbol? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Copula package

2009-04-22 Thread Roslina Zakaria
Hi R-users, I would like to use the copula package.  I  the package plus the mvtnorm and try to run the example given, but I got the following message: install.packages(repos=NULL,pkgs=c:\\Tinn-R\\copula_0.8-3.zip) norm.cop - normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = un) t.cop -

[R] to extract data

2009-04-20 Thread Roslina Zakaria
Hi R-users, I have a set of data from 1958-2009, how do I extract the data from 1927 and 2007?   beechworth.dt Year Month  Rain 1    1858 3  21.8 2    1858 4  47.0 3    1858 5  70.1 4    1858 6  78.7 5    1858 7 101.6 6    1858 8 129.8 7    1858 9  80.8 8   

[R] problem with new version

2009-04-20 Thread Roslina Zakaria
Hi R-users, I just change to the new version of R.  I just wonder why everytime I run my function I will get this message: source(.trPaths[4], echo=TRUE, max.deparse.length=1) Thank you. __ R-help@r-project.org mailing list

[R] Jacobian

2009-04-13 Thread Roslina Zakaria
Hi R-users,  I would like to use jacobian function from numDeriv package.  If I have more than one parameters how do I modify it? This is the example given in the package: func2 - function(x) c(sin(x), cos(x))    x - (0:1)*2*pi    jacobian(func2, x) Can I do the following: z - c(x,y) func2

[R] Maple and R

2009-04-07 Thread Roslina Zakaria
Hi R-users, Can Maple function be exported to R? I have a jacobian matrix (4X4) from maple in algebraic form which involve modified Bessel function of the first kind. I just wonder whether we can use algebraic form into R before the value of the parameters can be estimated. Thank you so much

[R] Newton method again

2009-04-07 Thread Roslina Zakaria
Hi Rolf, I would like to extend the problem that I asked you before regarding the newton method using 4 functions with 4 parameters.  My functions involve the modified bessel function of the first kind which I can type them without any problem. The big problem is the Jacobian matrix. I use

  1   2   >