[R] Implementation for selecting lag of a lag window spectral estimator using generalized cross validation (using deviance)

2024-07-10 Thread Ashim Kapoor
Dear All, I am looking for: A software to select the lag length for a lag window spectral estimator. Also, I have a small query in the reprex given below. Background for the above, from the book by Percival and Walden: 1. We are given X_1,...,X_n which is one realization of a stochastic process

Re: [R] Can someone please have a look at my query on stackoverflow ?

2024-05-28 Thread Ashim Kapoor
ts seasonal model to non-seasonal model which perhaps can then be used with arma.spec. Many thanks, Ashim On Tue, May 28, 2024 at 12:28 PM Uwe Ligges wrote: > > > > On 28.05.2024 06:41, Ashim Kapoor wrote: > > Dear Sir, > > > > OK. I will migrate this query to stats.s

Re: [R] Can someone please have a look at my query on stackoverflow ?

2024-05-27 Thread Ashim Kapoor
advice on > methods as well as an implicit request for a package recommendation. > > — > David > Sent from my iPhone > > > On May 27, 2024, at 5:40 AM, Ashim Kapoor wrote: > > > > Dear experts, > > > > I am having difficulty with computing spectrum

[R] Can someone please have a look at my query on stackoverflow ?

2024-05-27 Thread Ashim Kapoor
Dear experts, I am having difficulty with computing spectrum of seasonal ARMA models. My query is posted here : https://stackoverflow.com/questions/78526800/computing-the-spectrum-of-a-seasonal-model-in-r Will be grateful if someone has a look at it and responds. Many thanks, Ashim. [

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-18 Thread Ashim Kapoor
> > paperwidth=29.7cm, paperheight=21cm > > Olivier. > > On Sat, 18 Nov 2023 13:20:49 +0530 > Ashim Kapoor wrote: > > > Dear Olivier, > > > > Many thanks for your reply. > > > > Very cool. > > > > You know what I thought ? I thought you

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-17 Thread Ashim Kapoor
g smaller > steps and ratios differing from 16/9) depending on the aims to be > reached. > - It is also possible to specify different units (pt = points, in = > inches...) > > Yours. > Olivier. > > On Sat, 18 Nov 2023 09:53:19 +0530 Ashim Kapoor > wrote: > > > Dear O

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-17 Thread Ashim Kapoor
sepackage{dcolumn} > documentclass: article > geometry: margin=1.5cm, paperwidth=24cm, paperheight=13.5cm > --- > > Of course, you may change the exact dimensions and it will impact the > relative font sizes. I've tested it and it generates what you want. > > Yours.

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-16 Thread Ashim Kapoor
Hello, > 1366/768 [1] 1.778646 > 16/9 [1] 1.78 > There is a mild difference. Is that causing the problem? Best, Ashim On Thu, Nov 16, 2023 at 1:42 PM Ashim Kapoor wrote: > > Dear Bert, > > Following your suggestion: > > I checked my device resolution is : 136

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-16 Thread Ashim Kapoor
ratio *and* simultaneously fill your display device? > > If this is obviously wrong, feel free to ignore without replying. > > Cheers, > Bert > > On Tue, Nov 14, 2023 at 8:48 PM Ashim Kapoor wrote: >> >> Dear John, >> >> Many thanks for your reply. >&

Re: [R] Can someone please have a look at this query on stackoverflow?

2023-11-14 Thread Ashim Kapoor
number_sections: true > classoption: > - landscape > - "aspectratio=169" > header-includes: >- \usepackage{dcolumn} > documentclass: article > geometry: margin=1.5cm > --- > > ```{r, out.extra='keepaspectratio=true', out.height='100

[R] Can someone please have a look at this query on stackoverflow?

2023-11-13 Thread Ashim Kapoor
Dear all, I have posted a query which has received a response but that is not working on my computer. Here is the query: https://stackoverflow.com/questions/77387434/pdf-from-rmarkdown-landscape-and-aspectratio-169 Can someone please help me ? Best Regards, Ashim _

[R] olsrr and substitute lm -> lmRob

2023-10-10 Thread Ashim Kapoor
Dear all, I wish to use backward selection from the package olsrr. ?ols_step_backward_p This gives me a model of class lm. I wish to then run lmRob from the robust package on the SAME variables ie I want to substitute lm -> lmRob in the function call which created the lm model. Here is a reprex:

[R] leaps for plm - looking for variable selection software for panel data

2023-06-09 Thread Ashim Kapoor
Dear all, I have a small query. Just like we have package leaps which can do variable selection for a linear model, do we have any technique/software for variable selection for panel data? Here are the links to the mentioned packages: https://cran.r-project.org/web/packages/leaps/leaps.pdf http

Re: [R] Cryptic error from stargazer

2023-06-08 Thread Ashim Kapoor
- Yes I do think I now have 5.2.3 Many thanks, Ashim On Thu, Jun 8, 2023 at 1:13 PM Enrico Schumann wrote: > > On Thu, 08 Jun 2023, Ashim Kapoor writes: > > > Dear All, > > > > I had done an automatic upgrade of my Debian 10 system which had also > > upgraded

Re: [R] Cryptic error from stargazer

2023-06-07 Thread Ashim Kapoor
Dear All, I had done an automatic upgrade of my Debian 10 system which had also upgraded R. I reinstalled the stargazer package and the error went away. Query : Do I need to reinstall all packages with each upgrade of R ? Best, Ashim On Thu, Jun 8, 2023 at 11:11 AM Ashim Kapoor wrote

[R] Cryptic error from stargazer

2023-06-07 Thread Ashim Kapoor
Dear All, Here is my reproducible example: > library(stargazer) Please cite as: Hlavac, Marek (2018). stargazer: Well-Formatted Regression and Summary Statistics Tables. R package version 5.2.2. https://CRAN.R-project.org/package=stargazer > x1=1:1000 ; y = 2 * x1+ rnorm(1000) > stargazer(lm

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-13 Thread Ashim Kapoor
nd the negative values > positive. > Add an if test to selectively rotate based on the value of a single test > element in x (as in x[3,2]). > > In debugging or trouble shooting setting seed is useful. For actual data > analysis you should not set seed, or possibly better yet u

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Ashim Kapoor
> -Original Message- > From: R-help On Behalf Of Ashim Kapoor > Sent: Wednesday, October 12, 2022 7:48 AM > To: R Help > Subject: [R] prcomp - arbitrary direction of the returned principal components > > [External Email] > > Dear R experts, > > From ?prcomp, >

[R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Ashim Kapoor
Dear R experts, >From ?prcomp, snip - Note: The signs of the columns of the rotation matrix are arbitrary, and so may differ between different programs for PCA, and even between different builds of R. snip -- My problem is that I am building an index based on Pr

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Ashim Kapoor
-this will join two tables, but what I am trying to do is just standardize > the similarly spelled duplicate names in just the first column of a single > table. > > I don't think fuzzyjoin will help me in that regard. > > Thanks. > Gregg > Arizona, USA > > --

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Ashim Kapoor
Dear Gregg, Check this out: library(fuzzyjoin) ?stringdist_left_join Best Regards, Ashim On Wed, Jun 15, 2022 at 8:28 PM Gregg Powell via R-help wrote: > > Have data sets where there are names, in the first column, client names in > the second, and Client start date in the third. > > There ar

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-02 Thread Ashim Kapoor
Dear Sir, Many thanks for the reply. Best, Ashim On Thu, Jun 2, 2022 at 12:56 PM Martin Maechler wrote: > > >>>>> Ashim Kapoor > >>>>> on Wed, 1 Jun 2022 14:30:58 +0530 writes: > > > Dear Sir, > >> > I upgraded to R 4.2

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-01 Thread Ashim Kapoor
Dear Sir, Many thanks. Best Regards, Ashim On Wed, Jun 1, 2022 at 5:36 PM Jeroen Ooms wrote: > > On Wed, Jun 1, 2022 at 11:02 AM Ashim Kapoor wrote: > > > > My confusion is : Earlier R --vanilla incantation was working fine, > > even without my intervening and >

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-01 Thread Ashim Kapoor
Dear Sir, > > I upgraded to R 4.2.2 on Debian 10 today. > > Well, I assume you mean R 4.2.0 .. at least that one exists. My bad, yes I made a typo. I did mean R 4.2.0. > > The R shell incantation worked fine and all libraries would load but, > > I needed to point the R_LIBS variable to

Re: [R] Can browseURL open a lynx browser?

2022-03-20 Thread Ashim Kapoor
Dear Sir, > You mention reading the ?browseURL help page, but seem to make no reference > to the available options for invoking the browser of your choice. If the > browser you choose isn't behaving when you do this, then isn't this a > question for a forum related to that browser? OK. Thank

Re: [R] Can browseURL open a lynx browser?

2022-03-20 Thread Ashim Kapoor
Dear Sir, > I haven't used lynx in a while, but > > browseURL("http://www.google.com";, browser = "elinks -remote") > > works for me as long as an elinks session is already running. The above elinks incantation is working for me. Many thanks, Ashim __

Re: [R] Error with RMySQL

2021-11-01 Thread Ashim Kapoor
be working fine. Best, Ashim On Thu, Oct 28, 2021 at 2:24 PM Ashim Kapoor wrote: > > Dear Jim, > > I restarted the mariadb.service but I am STILL not able to access the server. > > I can access one database from one user but not from another user. The > credentials seem t

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Ashim Kapoor wrote: > > Dear Jim, > > Many thanks. I will try your suggestion and come back to you. > > Many thanks, > Ashim > > On Thu, Oct 28, 2021 at 1:25 PM Jim Lemon wrote: > > > > Hi Ashim, > > I was out for a while. I would first try to restart MySQL

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
ened. > > Jim > > On Thu, Oct 28, 2021 at 6:13 PM Ashim Kapoor wrote: > > > > Dear Jim, > > > > Can you please help me? I am a little confused here. > > > > Best, > > Ashim > > > > On Thu, Oct 28, 2021 at 11:30 AM Ashim K

Re: [R] Error with RMySQL

2021-10-28 Thread Ashim Kapoor
Dear Jim, Can you please help me? I am a little confused here. Best, Ashim On Thu, Oct 28, 2021 at 11:30 AM Ashim Kapoor wrote: > > Dear Jim, > > > That error means that your user number or group is not allowed to > > access it. Did you create the new one as a different us

Re: [R] Error with RMySQL

2021-10-27 Thread Ashim Kapoor
ccess db2. I did NOT restart the mysql server as I think the GRANT does not need a restart of the MySQL server. > Jim > > On Thu, Oct 28, 2021 at 4:42 PM Ashim Kapoor wrote: > > > > Dear R - users, > > > > I have 2 databases on a MySQL server. I am able to access t

[R] Error with RMySQL

2021-10-27 Thread Ashim Kapoor
Dear R - users, I have 2 databases on a MySQL server. I am able to access the old one but not the freshly created one. library(RMySQL) # This one is the old one, I am able to access it, > con1<- dbConnect(MySQL(),host= "myserver", db="db1", user= "user1",password > ="mypass1") # This is the new

Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-08 Thread Ashim Kapoor
a --default-packages=base,methods -e "1+2" [1] 3 > If any of 2-4 gives a different result, that's a first clue. > > /Henrik > Many thanks for your help, Best Regards, Ashim > On Wed, Apr 7, 2021 at 1:17 AM Ashim Kapoor wrote: > > > > On Wed, Apr 7, 2021 a

Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-07 Thread Ashim Kapoor
On Wed, Apr 7, 2021 at 12:51 PM Martin Maechler wrote: > > >>>>> Ashim Kapoor > >>>>> on Wed, 7 Apr 2021 10:35:14 +0530 writes: > > > Dear R experts, > > > Here is my problem : > > > R startup FAILS with an err

[R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-06 Thread Ashim Kapoor
Dear R experts, Here is my problem : R startup FAILS with an error message. The error message is more meaningful when I do invoke R via sudo OR as root. I attach the startup messages when I invoke R as : 1. as non root user 2. with sudo 3. as Root user. The error messages ( mentioned in snippet

[R] tidyquant package

2020-08-03 Thread Ashim Kapoor
Dear all, I am trying to follow along/ recreate this page ( but I do not get the same results) :- https://bookdown.org/sstoeckl/Tidy_Portfoliomanagement_in_R/s-2Data.html Here is a reprex / what I have done till now / my queries ( 3 in number ) are as comments :- > library(tidyquant) Loading re

Re: [R] The best way for making speciall matrix

2020-05-23 Thread Ashim Kapoor
Dear Vahid, Would this help? > row1<- c(1,0,0,4) > row2<- c(0,2,0,5) > row3<- c(0,0,3,6) > mymatrix <- rbind(row1,row2,row3) > mymatrix [,1] [,2] [,3] [,4] row11004 row20205 row30036 > Best Regards, Ashim On Sat, May 23, 2020 at 3:16 PM Vahid

Re: [R] 2 docker containers with R ?

2020-04-11 Thread Ashim Kapoor
Dear Bogdan, Perhaps https://rstudio.github.io/packrat/ can be of help? Best, Ashim On Sat, Apr 11, 2020 at 4:47 PM Ivan Krylov wrote: > On Sat, 11 Apr 2020 03:44:51 -0700 > Bogdan Tanasa wrote: > > > how could I have Seurat2 and Seurat3 on the same machine > > What I would try first is to

Re: [R] R Markdown & chunk extraction in R

2020-04-08 Thread Ashim Kapoor
ist of code chunks) inside a knitr document when the document > _is being knitted_. It doesn't work outside the document. Ideally, you > should use the document parser of knitr, but it is not exported. > > Regards, > Yihui > -- > https://yihui.org > > On Wed, Apr

Re: [R] R Markdown & chunk extraction in R

2020-04-08 Thread Ashim Kapoor
Dear Sigbert, Also see this :- https://www.rdocumentation.org/packages/knitr/versions/1.28/topics/knit_code Best, Ashim On Wed, Apr 8, 2020 at 1:13 PM Ashim Kapoor wrote: > Dear Sigbert, > > Please see this. > > https://bookdown.org/yihui/rmarkdown-cookbook/purl.html > >

Re: [R] R Markdown & chunk extraction in R

2020-04-08 Thread Ashim Kapoor
Dear Sigbert, Please see this. https://bookdown.org/yihui/rmarkdown-cookbook/purl.html Best, Ashim On Wed, Apr 8, 2020 at 1:02 PM Sigbert Klinke wrote: > Hi, > > exists a possibility to extract chunks from a R Markdown file and to > return them as (named) list in R? > > Thanks Sigbert > > --

Re: [R] Program to produce multiple plots

2020-03-30 Thread Ashim Kapoor
Dear David, Try this :- par(mfrow=c(1,2)) hist(rnorm(100)) hist(rnorm(100,100,1)) Best Regards, Ashim On Mon, Mar 30, 2020 at 7:16 PM David wrote: > I wrote a little program that asked to produce two plots, but when I ran > it, I saw only the second plot. Is there a way to write a program th

[R] Correct place to put an import directive

2020-01-29 Thread Ashim Kapoor
Dear All, This is a cross post of the following query:- https://stackoverflow.com/questions/59946803/import-directive-in-r-which-file-and-where-in-that-file-should-we-put-this Since no one answered this query, so I am posting this here. Can someone please help me ? Thank you, Ashim [

Re: [R] Tables from Rmarkdown to Word Document - using huxtables

2019-12-12 Thread Ashim Kapoor
> > And set_caption is asking for a flextable object, doesn't work with > huxtable. > > I don't know how to solve it right now, I will try later. > > Rui Barradas > > Às 10:51 de 12/12/19, Ashim Kapoor escreveu: > > Hello once again, >

Re: [R] Tables from Rmarkdown to Word Document - using huxtables

2019-12-12 Thread Ashim Kapoor
Hello once again, for me,set_caption is not working as well. Here is my Rmd file :- --- title: Testing Huxtables author: Ashim Kapoor output: word_document --- ```{r} library(dplyr) library(huxtable) hx <- iris %>% group_by(Species) %>% summarise_if(is.numeric, mean) %>

Re: [R] Tables from Rmarkdown to Word Document - using huxtables

2019-12-11 Thread Ashim Kapoor
uot;) > > Does set_width work for you ? For me modifying the argument to set_width is NOT working. > There are ways of doing the same without pipes, those functions don't > have the prefix 'set_'. But I believe that what's important is function > ?quick_do

[R] Tables from Rmarkdown to Word Document - using huxtables

2019-12-11 Thread Ashim Kapoor
Dear All, I am reading this :- https://hughjonesd.github.io/huxtable/huxtable.html I quote from the above: If you want to create Word or Powerpoint documents, install the flextable package from CRAN. Huxtables can then be automatically printed in W

Re: [R] Orthogonal polynomials used by R

2019-11-28 Thread Ashim Kapoor
inal query was about the polynomials used by R which I think is ON topic. My apologies that this query turned into a statistics query. > Best, > John > > - > John Fox, Professor Emeritus > McMaster University > Hamilton, Ontario, Cana

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
icking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Wed, Nov 27, 2019 at 9:47 PM Ashim Kapoor > wrote: > >> Dear Peter and John, >> >> Many thanks for your prompt replies. >> >> Here is what

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
ted(m1)) > [1] TRUE > > --- snip --- > > Because one is usually not interested in the individual coefficients of a > polynomial there usually isn't a reason to prefer one parametrization to > the other on the grounds of interpretability, so why do you need to >

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
low.com/questions/39031172/how-poly-generates-orthogonal-polynomials-how-to-understand-the-coefs-ret/39051154#39051154> > > Cheers > Petr > > > -Original Message- > > From: R-help On Behalf Of Ashim Kapoor > > Sent: Wednesday, November 27, 2019 12:55 PM &g

[R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
Dear All, I have created a time trend by doing x<-1:93 because I have a time series with 93 data points. Next I did :- y = lm(series ~ poly(x,4))$residuals to detrend series. I choose this 4 as the order of my polynomial using cross validation/ checking the absence of trend in the residuals so

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
rgeting PDF output uses LaTeX which regards double backticks as a method > of encoding a left curly double quote mark, so this error could derive from > an incomplete adaptation of the Rmd file for HTML output even though such a > symbol doesn't make sense there in PDF either.

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
ble quote mark, so this error could derive from an > incomplete adaptation of the Rmd file for HTML output even though such a > symbol doesn't make sense there in PDF either. > > On October 14, 2019 4:35:26 AM PDT, Ashim Kapoor > wrote: > >Dear All, >

[R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
Dear All, I am reading this file :- https://rmarkdown.rstudio.com/lesson-6.html My query is : In line 14 of the above file, ie. The [marmap](https://cran.r-project.org/web/packages/marmap/index.html) package provides tools and data for visualizing the ocean floor. Here is an example contour plo

[R] Correct way to use a lemmatizer in package tm

2019-08-14 Thread Ashim Kapoor
Dear All, I want to do lemmatization using the tm package and textstem package. The following is how I am doing it currently :- library("tm") library("wordcloud") library("RColorBrewer") filePath = < Path to any text file > text <- readLines(filePath) docs <- Corpus(VectorSource(text)) # Conve

[R] Package sf, unit for dist in st_buffer

2019-07-04 Thread Ashim Kapoor
Dear All, map3 <- st_read("My Shapefile") %>% st_as_sf %>% st_transform(crs = 7755) # Please see any shapefile here : https://github.com/datameet/maps/tree/master/Districts map_buffer <- st_buffer(mapHR, dist = -1000) # CRS 7755 is for India, please see here, https://epsg.io/7755 My query is : T

Re: [R] Error in installing pbmcapply / WhatIf

2019-06-27 Thread Ashim Kapoor
Dear Ivan, OK and thank you for your help. Best Regards, Ashim On Thu, Jun 27, 2019 at 3:34 PM Ivan Krylov wrote: > On Thu, 27 Jun 2019 12:48:50 +0530 > Ashim Kapoor wrote: > > > R version 3.3.3 (2017-03-06) > > > process.c:10:23: error: unknown type name ‘DllInfo’ &

[R] Error in installing pbmcapply / WhatIf

2019-06-27 Thread Ashim Kapoor
Dear All, I am not able to install pbmcapply which I need for package WhatIf. Here are my sessionInfo and the error message :- > sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) locale: [1] LC_CTYPE=en_IN LC_NUME

[R] Intuition behind time varying parameters regression model.

2019-04-24 Thread Ashim Kapoor
Dear All, I have a query which I have posted on Stack Exchange:- https://stats.stackexchange.com/questions/404353/do-all-parameters-have-to-have-the-same-nature-in-a-structural-change-test Can some one here please have a look at this ? I posted but I did not receive any reply. Many thanks, Ashi

Re: [R] magick package says format is PNG when we load an SVG.

2019-02-25 Thread Ashim Kapoor
? So I'd > expect that image_read_svg() converts the file on the fly. > > -pd > > > On 25 Feb 2019, at 08:27 , Ashim Kapoor wrote: > > > > Dear All, > > > > Here is a MWE : > > > > library(magick) > > tiger <- image_read_sv

[R] magick package says format is PNG when we load an SVG.

2019-02-24 Thread Ashim Kapoor
Dear All, Here is a MWE : library(magick) tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400) print(tiger) ## format width height colorspace matte filesize density ## 1PNG 400400 sRGB TRUE0 72x72 Why does the format say PNG ? Should it n

Re: [R] Unable to compute Confidence Intervals from output from MARSS package

2019-01-23 Thread Ashim Kapoor
mp; Cis. > > I now get new error similarly as you, my apologies. > > final <- MARSSparamCIs(fit) > Error in dpari[time.varying] <- dparmat(MLEobj, time.varying, t = t) : > replacement has length zero > > WHP > > From: R-help On Behalf Of Ashim Kapoor > Sent: W

[R] Unable to compute Confidence Intervals from output from MARSS package

2019-01-22 Thread Ashim Kapoor
Dear All, I am trying to use this package ---> https://cran.r-project.org/web/packages/MARSS/index.html I am reading this book which shows some examples based on the above package ---> https://nwfsc-timeseries.github.io/atsa-labs/ In a few words, the incantation MARSS(...) estimates the parameter

[R] Reproducing the results from package dlm

2018-12-30 Thread Ashim Kapoor
Dear all, I have a query with regards to the package dlm. My query is : will dlm return the same results if I give it the same data set ? Here is a MWE ( created from : https://sites.ualberta.ca/~sfossati/e509/files/other/dlm_ex.R ) library(dlm) # simulate AR(1) process # phi = .8, sig2 = .25 n

[R] Help needed regarding dlm model on stats.stackexchange

2018-11-23 Thread Ashim Kapoor
Dear all, I have created a time varying parameters regression. When I do that I have a parameter which is AR1. I am not able to recover this parameter. My query is posted here : https://stats.stackexchange.com/questions/377295/unable-to-recover-time-varying-ar1-parameter-from-state-space-model

Re: [R] Output of arima

2018-11-14 Thread Ashim Kapoor
two coefficients, as requested/expected. > > HTH, > Eric > > > On Wed, Nov 14, 2018 at 12:08 PM Ashim Kapoor > wrote: > >> Dear Eric and William, >> >> Why do the 1st and 2nd incantation of arima return sigma^2 as 5.233 vs >> .? >> The help for a

Re: [R] Output of arima

2018-11-14 Thread Ashim Kapoor
s.e. 0.0145 0.2783 > > sigma^2 estimated as 1.002: log likelihood = -1420.82, aic = 2847.63 > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Tue, Nov 13, 2018 at 4:02 AM, Ashim Kapoor > wrote: > >> Dear All, >> >> Here

[R] Output of arima

2018-11-13 Thread Ashim Kapoor
Dear All, Here is a reprex: set.seed(123) b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) arima(b) Call: arima(x = b) Coefficients: intercept 0.2250 s.e. 0.0688 sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81 > Should sigma^2 not be equal to

Re: [R] Does R version 3.4.4 work on Ubuntu 18.04.1

2018-09-18 Thread Ashim Kapoor
Dear All, Okay and thank you. Best Regards, Ashim On Wed, Sep 19, 2018 at 3:32 AM Benoit Vaillant wrote: > Hello, > > On Tue, Sep 18, 2018 at 09:08:18AM -0400, Ista Zahn wrote: > > This is really the wrong place for this discussion. Please post ubuntu > > specific questions to r-sig-debian. >

Re: [R] Does R version 3.4.4 work on Ubuntu 18.04.1

2018-09-18 Thread Ashim Kapoor
you have any practical reason for asking this? > > Rui Barradas > > Às 08:24 de 18/09/2018, Ashim Kapoor escreveu: > > Dear Rui, > > > > I am a little confused. > > > > See this ---> : R 3.4 packages for Ubuntu on i386 and amd64 are > > available for

Re: [R] Does R version 3.4.4 work on Ubuntu 18.04.1

2018-09-18 Thread Ashim Kapoor
, I'm saying it > can be *run* on Ubuntu 18.04.1.) > > Hope this helps, > > Rui Barradas > > > Às 06:51 de 18/09/2018, Ashim Kapoor escreveu: > > Dear All, > > > > I was reading this page ---> > > https://cran.r-project.org/bin/linux/ubuntu/READM

[R] Does R version 3.4.4 work on Ubuntu 18.04.1

2018-09-17 Thread Ashim Kapoor
Dear All, I was reading this page ---> https://cran.r-project.org/bin/linux/ubuntu/README.html It says: R 3.4 packages for Ubuntu on i386 and amd64 are available for all stable Desktop releases of Ubuntu prior to Bionic Beaver (18.04) until their official end of life date. The page also shows ho

Re: [R] Unclear about the output from summary of ca.jo from package urca

2018-08-24 Thread Ashim Kapoor
nd > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Thu, Aug 23, 2018 at 2:12 AM Ashim Kapoor > wrote: > >> Dear All, >> >> I am not sure about the summary of the function ca.jo. I have pos

[R] Unclear about the output from summary of ca.jo from package urca

2018-08-23 Thread Ashim Kapoor
Dear All, I am not sure about the summary of the function ca.jo. I have posted my query here :- https://stats.stackexchange.com/questions/363188/interpreting-the-names-used-in-the-output-of-johansen-test-in-package-urca-in-r I did not receive any reply so I am posting my query here. Many thanks

[R] Last page on a multi page, faceted graph created using ggforce, loses its layout under a certain condition

2018-06-01 Thread Ashim Kapoor
Dear All, I posted this query on stack overflow but I received no replies so I am posting it here so that someone here can take a look at this. My query is that suppose the variable I am faceting by has 40 categories and I want 3 categories per page( 1 row x 3 columns),then the last category fill

Re: [R] Understanding which

2018-04-18 Thread Ashim Kapoor
you want > > x[ !( x > 100 ) ] > > ? > > On April 18, 2018 6:13:30 AM CDT, Ashim Kapoor > wrote: > >Dear All, > > > >Here is a reprex: > > > >> x<- 1:100 > >> x[-which(x>100)] > >integer(0) > > > >In words,

[R] Understanding which

2018-04-18 Thread Ashim Kapoor
Dear All, Here is a reprex: > x<- 1:100 > x[-which(x>100)] integer(0) In words, I am finding out which indices correspond to values in x which are greater than 100 ( there are no such items ) . Then I remove those indices. I should get back the x that I started with since there are no items in

[R] grepAMModelLib in package AMML not working as expected

2018-03-07 Thread Ashim Kapoor
Dear All, Here is a minimal working example : library(AMModels) mymodels <- amModelLib(description = "Simple AM Model library") dataset1 <- 1:100 dataset2 <- seq(2,200,2) model1 <- lm(dataset2~1) model2 <- lm(dataset2~ dataset1) m1 <- amModel(model = model1,comment = "Initial model.") m2 <-

Re: [R] SpreadLevelPlot for more than one factor

2018-01-15 Thread Ashim Kapoor
ause the data are balanced. > > Best, > John > > - > John Fox, Professor Emeritus > McMaster University > Hamilton, Ontario, Canada > Web: http://socserv.mcmaster.ca/jfox/ > > > > > On 2018-01-09, 10:18 AM, "Ashim Kapoor" wrote: > > >Dear S

Re: [R] SpreadLevelPlot for more than one factor

2018-01-09 Thread Ashim Kapoor
> Web: socialsciences.mcmaster.ca/jfox/ > > > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ashim > > Kapoor > > Sent: Sunday, January 7, 2018 12:08 AM > > To: r-help@r-project.org > > Subject

Re: [R] SpreadLevelPlot for more than one factor

2018-01-07 Thread Ashim Kapoor
1) / p ? Which one of the following is the final transformation ? Please clarify. > boxplot(breaks ^ -.2 ~v) > boxplot((breaks^-.2 -1)/(-.2)~v) > Best Regards, Ashim On Sun, Jan 7, 2018 at 10:59 AM, Ashim Kapoor wrote: > Dear All, > > we need to do : > > library(car) fo

Re: [R] SpreadLevelPlot for more than one factor

2018-01-06 Thread Ashim Kapoor
Dear All, we need to do : library(car) for the spreadLevelPlot function I forgot to say that. Apologies, Ashim On Sun, Jan 7, 2018 at 10:37 AM, Ashim Kapoor wrote: > Dear All, > > I want a transformation which will make the spread of the response at all > combinations > of

[R] SpreadLevelPlot for more than one factor

2018-01-06 Thread Ashim Kapoor
Dear All, I want a transformation which will make the spread of the response at all combinations of 2 factors the same. See for example : boxplot(breaks ~ tension * wool, warpbreaks) The closest I can do is : spreadLevelPlot(breaks ~tension , warpbreaks) spreadLevelPlot(breaks ~ wool , warp

[R] clustering levels using Tukey HSD in a one way anova

2017-12-31 Thread Ashim Kapoor
Dear all, I am doing a one way between subjects anova in an unbalanced data set. Suppose we have "a" levels of the one factor. I want to merge the not so significantly different levels into the same cluster. Can I do a Tukey Kramer HSD and then use the following algorithm: For i in 2 : "a"

[R] How to read PMML data from a text file and convert it to a model ?

2017-11-15 Thread Ashim Kapoor
Dear All, I want to save the XML representation of a model using PMML. Then I want to read the model and predict using the model and a new dataset. This is described in this blog post : https://www.r-bloggers.com/predictive-modeling-using-r-and-the-openscoring-engine-a-pmml-approach/ I am able

[R] regex in maps package

2017-10-17 Thread Ashim Kapoor
Dear All, >From : ?maps::map we have : map(database = "world", regions = ".", exact = FALSE, boundary = TRUE, interior = TRUE, projection = "", parameters = NULL, orientation = NULL, fill = FALSE, col = 1, plot = TRUE, add = FALSE, namesonly = FALSE, xlim = NULL, ylim

Re: [R] Default value of the option initial in the ses function in the forecast package.

2017-10-02 Thread Ashim Kapoor
Dear Peter, Many thanks, Ashim On Mon, Oct 2, 2017 at 3:30 PM, peter dalgaard wrote: > The first one, i.e. "optimal"; check help for match.arg() for the idiom. > > -pd > > > > On 2 Oct 2017, at 11:48 , Ashim Kapoor wrote: > > > > Dear All, > >

[R] Default value of the option initial in the ses function in the forecast package.

2017-10-02 Thread Ashim Kapoor
Dear All, I am trying to use the function ses from the forecast package. >From its help I have : Usage: ses(y, h = 10, level = c(80, 95), fan = FALSE, initial = c("optimal", "simple"), alpha = NULL, lambda = NULL, biasadj = FALSE, x = y, ...) My query is that if I do not mention th

[R] ggmap + geom_raster

2017-09-13 Thread Ashim Kapoor
Dear all, I want to : 1. Estimate a weighted 2D kernel. 2. Paint a heatmap on a ggmap. Here is some reproducible data / code (I got it from the internet) : s_rit <- structure(list(score = c(45, 60, 38, 98, 98, 53, 90, 42, 96, 45, 89, 18, 66, 2, 45, 98, 6, 83, 63, 86, 63, 81, 70, 8, 78, 15, 7, 8

[R] Keep only those values in a row in a data frame which occur only once.

2017-06-11 Thread Ashim Kapoor
Dear All, I have a file data.txt as follows: Name_1,A,B,C Name_2,E,F Name_3,I,J,I,K,L,M I will read this with: my_data<- read.csv("data.txt",header=FALSE,col.names=paste0("V", seq(1:10)),fill=TRUE) Then the file will have 10 columns. I am assuming that each row in data.txt will have at the max

Re: [R] regular expression help

2017-06-08 Thread Ashim Kapoor
Dear Enrico, Many thanks and Best Regards, Ashim. On Thu, Jun 8, 2017 at 5:11 PM, Enrico Schumann wrote: > > Zitat von Ashim Kapoor : > > > Dear All, >> >> My query is: >> >> Do we always need to use perl = TRUE option when doing ignore.case=TRUE

[R] regular expression help

2017-06-08 Thread Ashim Kapoor
Dear All, My query is: Do we always need to use perl = TRUE option when doing ignore.case=TRUE? A small example : my_text = "RECOVERY OFFICER-II\nDEBTS RECOVERY TRIBUNAL-III\n RC No. 162/2015\nSBI VS RAMESH GUPTA.\nDated: 01.03.2016 Item no.01\n Present: Ms. Sonakshi, t

Re: [R] Warning from reshape2 when melting a data frame with uneven number of columns.

2017-06-04 Thread Ashim Kapoor
quot;,..: 1 2 3 > $ V2: Factor w/ 3 levels "nam1","name-1",..: 1 3 2 > $ V3: Factor w/ 3 levels "nam2","nam_34",..: 1 2 3 > $ V4: Factor w/ 3 levels "","nam3","nam_56": 2 3 1 > $ V5: Factor w/ 2 levels "&quo

[R] Warning from reshape2 when melting a data frame with uneven number of columns.

2017-06-04 Thread Ashim Kapoor
Here is a small reproducible example: data <- structure(list(V1 = structure(1:3, .Label = c("Name1", "Name2", "Name3"), class = "factor"), V2 = structure(c(1L, 3L, 2L), .Label = c("nam1", "name-1", "name_12"), class = "factor"), V3 = structure(1:3, .Label = c("nam2", "nam_34", "name-2"), class = "

[R] Analysing the output from skmeans/clustering

2017-05-28 Thread Ashim Kapoor
Dear All, Here is a small example: library(skmeans) library(tm) data("crude") #Examine the first document inspect(crude[[1]]) dtm <- DocumentTermMatrix(crude, control = list(removePunctuation = TRUE, removeNumbers = TRUE,

Re: [R] qqplot for binomial distribution

2017-05-11 Thread Ashim Kapoor
7, 9, 8, 7, 2, 5, 4, 3, 7, 7, 2, 5, 4, 3, 3, 6, 10, 4, 9, 6, 5, 3, 4, 5, 5, 6, 6, 7, 3, 4, 8, 6, 4, 5, 1, 5, 9, 3, 6, 2, 4, 5, 5, 3, 3, 3, 3, 5, 4, 4, 5, 5, 1, 4, 5, 8, 7, 4, 3, 3, 5, 5, 4, 6, 5, 4, 7, 4, 4, 3, 3, 8, 4, 6, 7, 3, 4, 3, 5, 5, 7, 3, 6, 9, 7, 4, 3, 2, 6) On Wed, Apr 19, 201

Re: [R] Perfect prediction of AR1 series using package dlm, posted on stack exchange

2017-05-05 Thread Ashim Kapoor
te values, hence the > conditional distribution of theta_t given y_t is just the point value of > y_t... > > -pd > > > On 4 May 2017, at 12:05 , Ashim Kapoor wrote: > > > > Dear all, > > > > I have made a dlm model,where I am getting a perfect predicti

[R] Perfect prediction of AR1 series using package dlm, posted on stack exchange

2017-05-04 Thread Ashim Kapoor
Dear all, I have made a dlm model,where I am getting a perfect prediction. Here is a link to the output: http://pasteboard.co/9IxVQwjm6.png The query and code is on: https://stats.stackexchange.com/questions/276449/perfect-prediction-in-case-of-a-univariate-ar1-model-using-dlm Can someone her

Re: [R] The effect of tolerance in all.equal()

2017-04-30 Thread Ashim Kapoor
On Sun, Apr 30, 2017 at 10:05 PM, Duncan Murdoch wrote: > On 30/04/2017 12:26 PM, Ashim Kapoor wrote: > >> Dear All, >> >> This answer is very clear. Many thanks. >> >> I am now confused about how str*ucture works. Where can I read more about >> when do

  1   2   >