[R] Rserve/RandomForest does not work with a CSV?

2009-01-10 Thread anthony
but if instead, the x / y / future values are built using the array command, it works fine? As a secondary question, is it faster/slower to do it this way? Certainly is pretty convenient to use the CSV's. This one is driving us bonkers! -- Anthony __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] svyglm

2017-12-09 Thread Anthony Damico
hi, could you create a reproducible example starting from http://asdfree.com/pesquisa-nacional-de-saude-pns.html ? thanks On Mon, Dec 4, 2017 at 9:56 AM, Luciane Maria Pilotto via R-help < r-help@r-project.org> wrote: > Hi, > I am trying to run analyzes incorporating sample weight, strata and >

Re: [R] exporting data to stata

2018-03-22 Thread Anthony Damico
hi, you can export the dataset from an R survey design to stata with install.packages('survey') library(survey) library(foreign) write.dta( data1$variables , "c:/path/to/file.dta" ) then type "data1" into the R console to look at the weight, id/cluster, strata, and fpc variables to use for the "

[R] more floating point sensitivity in 3.5.0?

2018-05-18 Thread Anthony Damico
hi all, in the past two days, i've found two places in unrelated code where i needed to substitute something like `x == y` with `isTRUE(all.equal(x,y))` to fix problems that started occurring in 3.5.0 on windows. the release news[1] makes one mention of floating points, but i'm not sur

Re: [R] Multinomial Logistic Regression with Complex Survey using 'Survey' Package in R

2018-06-19 Thread Anthony Damico
hi, check out the news page.. https://cran.r-project.org/web/packages/survey/NEWS On Tue, Jun 19, 2018 at 5:54 PM, Mackenzie Jones wrote: > Dear R Users, > > I want to use a multinomial logistic regression model with survey data in > the “survey” package. The original package did not have a func

Re: [R] ESS issue: lines moved right 40 spaces

2018-07-26 Thread Anthony Hirst
I don't know the answer but here is the info for the ess list. ess-h...@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help On Thu, Jul 26, 2018 at 11:26 AM Rich Shepard wrote: >I used to be subscribed to the ess SIG, but cannot find any saved > messages > from that l

Re: [R] cannot load .sav-files in R 3.4.0

2017-05-01 Thread Anthony Damico
hi, i don't think foreign::read.spss or haven::read_spss have ever worked with a handful of the ess files, but library(memisc) does. you are better off loading ess with library(lodown) because the drudge work has already been done-- library(devtools) devtools::install_github("ajdamico/lo

Re: [R] cannot load .sav-files in R 3.4.0

2017-05-01 Thread Anthony Damico
did my code work? thanks On Mon, May 1, 2017 at 11:35 AM, wrote: > hi, thanks for the reply! > it always worked until 3.4.0. i got warning but they did not stop R > loading the file ... > > Am 01.05.2017 16:10 schrieb Anthony Damico: > >> hi, i don't thin

Re: [R] cannot load .sav-files in R 3.4.0

2017-05-02 Thread Anthony Damico
sführung angehalten > ERROR: loading failed for 'i386', 'x64' > * removing '\\unetna01/mandersk$/Daten/R/win-library/3.3/lodown' > Error: Command failed (1) > > Am 01.05.2017 18:15 schrieb Anthony Damico: > >> did my code work? thanks >> &

[R] RJDBC

2017-05-02 Thread Nelson Anthony
sPath="/usr/lib/oracle/12.2/client64/lib/ojdbc8.jar") pcm_stg_conn <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@//hostname:1521/SID", "username", "password"). Can you please help in resolving this issue Thanks & Regards. Anthony Nelson [[al

Re: [R] Svyglm Error

2017-07-05 Thread Anthony Damico
hi, i am not hitting an error when i copy and paste your code into a fresh console. maybe compare your sessionInfo() to mine? > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack

Re: [R] Help with ftable.svyby

2017-07-09 Thread Anthony Damico
try resetting your factor levels and re-run? q50 <- update( q50 , INCOME = factor( INCOME ) , AGECL = factor( AGECL ) , RACECL = factor( RACECL ) ) On Sun, Jul 9, 2017 at 2:59 PM, Orsola Costantini via R-help < r-help@r-project.org> wrote: > Hi all, > > When I try the following with pkg Surve

[R] readLines without skipNul=TRUE causes crash

2017-07-15 Thread Anthony Damico
hello, the last line of the code below causes a segfault for me on 3.4.1. i think i should submit to https://bugs.r-project.org/ unless others have advice? thanks install.packages( "devtools" ) devtools::install_github("ajdamico/lodown") devtools::install_github("jimhester/archive") file_f

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-15 Thread Anthony Damico
the embedded nuls have something to do with it-- # WARNING do not run with less than 64GB RAM tf <- tempfile() a <- rep( "a" , 10 ) b <- paste( a , collapse = '' ) writeLines( b , tf ) ; rm( b ) ; gc() d <- readLines( tf ) On Sat, J

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-15 Thread Anthony Damico
15, 2017 at 10:32 AM, Anthony Damico wrote: > hi, thanks Dr. Murdoch > > > i'd appreciate if anyone on r-help could help me narrow this down? i > believe the segfault occurs because there's a single line with 4GB and also > embedded nuls, but i am not sure how to

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Anthony Damico
the bother On Sat, Jul 15, 2017 at 4:14 PM, Duncan Murdoch wrote: > On 15/07/2017 11:33 AM, Anthony Damico wrote: > >> hi, i realized that the segfault happens on the text file in a new R >> session. so, creating the segfault-generating text file requires a >> contri

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Anthony Damico
d): >> ## [1] compiler_3.4.1 >> tools::md5sum( fn1 ) >> ## /home/jdnewmil/Downloads/Microdados ENEM 2009/Dados Enem >> 2009/DADOS_ENEM_2009.txt >> ## >> "83e61c96092285b60d7bf6b0dbc7072e" >> dat <- readLines( fn1 ) >> length( dat ) >>

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Anthony Damico
sorry, typo, 80937 not 809367 On Sun, Jul 16, 2017 at 6:21 AM, Anthony Damico wrote: > hi, thank you for attempting this. it looks like your unix machine > unzipped the txt file without corruption -- if you copied over the same txt > file to windows 7, i don't think that would

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Anthony Damico
7-15 17:19:47 no On Sun, Jul 16, 2017 at 6:34 AM, Duncan Murdoch wrote: > On 16/07/2017 6:17 AM, Anthony Damico wrote: > >> thank you for taking the time to write this. i set it running last >> night and it's still going -- if it doesn't finish by tomorrow, i will

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-16 Thread Anthony Damico
that segfaults when presented > with that corrupt file? Can you please confirm the file name and run md5sum > on it and share the result so we can tell when the file problem has been > reproduced? > -- > Sent from my phone. Please excuse my brevity. > > On July 16, 2017 3:21:21 A

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-17 Thread Anthony Damico
ine. > > I would discourage you from harassing the Brazilian government about their > RAR file because the RAR file seems fine (no NUL characters appear in the > text file) when extracted using the file-roller archive tool on Ubuntu. > -- > Sent from my phone. Please excuse my brevity

Re: [R] readLines without skipNul=TRUE causes crash

2017-07-17 Thread Anthony Damico
## BLAS: /usr/lib/libblas/libblas.so.3.0 >>>> ## LAPACK: /usr/lib/lapack/liblapack.so.3.0 >>>> ## >>>> ## locale: >>>> ## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >>>> ## [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 >>>&

Re: [R] Import selected columns from sas7bdat file

2017-08-10 Thread Anthony Damico
hi, the sas universal viewer might be a free, non-R way to convert a sas7bdat file to non-proprietary formats, not sure if it's windows-only. those other formats should be easier to import only a subset of columns into R.. https://support.sas.com/downloads/browse.htm?fil=&cat=74 On Thu, Aug 10, 2

[R] code to provoke a crash running rterm.exe on windows

2016-05-28 Thread Anthony Damico
hi, here's a minimal reproducible example that crashes my R 3.3.0 console on a powerful windows server. below the example, i've put the error (not crash) that occurs on R 3.2.3. should this be reported to http://bugs.r-project.org/ or am i doing something silly? thanx # C:\Users\AnthonyD>"c

Re: [R] asking for large memory - crash running rterm.exe on windows

2016-05-28 Thread Anthony Damico
Maechler wrote: > >>>>> Ben Bolker > >>>>> on Sat, 28 May 2016 15:42:45 + writes: > > > Anthony Damico gmail.com> writes: > >> > >> hi, here's a minimal reproducible example that crashes my > >> R 3

Re: [R] svykappa using the survey package

2016-06-20 Thread Anthony Damico
hi pradip, this should give you what you want library(foreign) library(survey) tf <- tempfile() download.file( " https://meps.ahrq.gov/mepsweb/data_files/pufs/h163ssp.zip"; , tf , mode = 'wb' ) z <- unzip( tf , exdir = tempdir() ) x <- read.xport( z ) names( x ) <

Re: [R] svymean using the survey package - strata containing no subpopulation members

2016-06-22 Thread Anthony Damico
t; this case - Asians with diabetes diagnosed in MEPS 2013). Is there a way to > get this count or ask R to provide this information? Any hints will be > appreciated. > > Acknowledgements: The current R script is a tweaked-version of the code > originally sent (on this forum) by A

Re: [R] r code for multilevel latent class analysis

2016-07-07 Thread Anthony Damico
start at https://github.com/ajdamico/asdfree/blob/master/European%20Social%20Survey/structural%20equation%20modeling%20examples.R maybe? On Thu, Jul 7, 2016 at 6:26 AM, Cristina Cametti wrote: > Dear all, > > I am not able to find a reliable r code to run a multilevel latent class > model. Indee

Re: [R] svytable: How do i create a table informing a third variable?

2016-09-02 Thread Anthony Damico
# mean svymean( ~ income_variable , NN ) svyby( ~ income_variable , ~ age + sex , NN , svymean ) # median svyquantile( ~ income_variable , NN ) svyby( ~ income_variable , ~ age + sex , NN , svyquantile , 0.5 ) On Fri, Sep 2, 2016 at 3:04 PM, Juan Ceccarelli Arias wrote: > Hello > Im analyzin

Re: [R] Svyglm Error in Survey Package

2016-09-23 Thread Anthony Damico
hi could you make this a minimal reproducible example? On Sep 24, 2016 12:03 PM, "Courtney Benjamin" wrote: > In attempting to use the svyglm call in the R Survey Package, I am > receiving the error: Error in pwt[i] : invalid subscript type 'list' > > I have not been able to find a lot of inform

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-05 Thread Anthony Damico
hi, after running each individual line of code above, check that the object still has the expected number of records and unique county fips codes. it looks like length( shapes$GEOID ) == 3233 but nrow( merged_data ) == 3109. the way for you to debug this is for you to go through line by line after

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-05 Thread Anthony Damico
com/reubano/1281134. > > Thanks again! > > Sincerely, > > Shouro > > On Tue, May 5, 2015 at 5:21 PM, Anthony Damico wrote: > >> hi, after running each individual line of code above, check that the >> object still has the expected number of records and unique

Re: [R] confidence intervals for differences in proportions from complex survey design?

2015-05-10 Thread Anthony Damico
i don't know the answer to your larger question, but for confidence intervals around proportions you might look at ?svyciprop. one of the method= options might yield the same result as your approximation, not sure On Mon, May 11, 2015 at 12:40 AM, Brown, Tony Nicholas < tony.n.br...@vanderbilt.ed

Re: [R] Households per Census block

2015-08-03 Thread Anthony Damico
hi, ccing the package maintainer. one alternative is to pull the HU100 variable directly from the census bureau's summary files: that variable starts at position 328 and ends at 336. just modify this loop and you'll get a table with one-record-per-census-block in every state. https://github.com/

[R] minimal reproducible read.fwf() example that crashes the console on windows 8 with 32-bit R

2015-08-15 Thread Anthony Damico
hi, if i copy and paste this (pretty straightforward) code into R 3.2.2's 32-bit console, the program dies. if i use 64-bit R, the console doesn't die, but the process ends with a weird line-ending warning. i'm under the impression that if the console crashes, it's a bug? but i wanted to check w

Re: [R] Missing Data Imputation for Complex Survey Data

2014-12-12 Thread Anthony Damico
the mitools package is compatible with the survey package.. asdfree.com has complete step-by-step R code examples to work with govt microdata. here are the ones with multiply imputed survey data. :) national health interview survey national survey of children's health consumer expenditure survey

Re: [R] R example codes for direct standardization of rates (Reference: Thoma's Lumley's survey package)

2014-12-30 Thread Anthony Damico
hi pradip hope you're doing well! these two scripts have age adjustment calculations, but neither are specific to nhis. the nhanes example is probably closer to what you're trying to do :) https://github.com/ajdamico/usgsd/blob/master/National%20Health%20and%20Nutrition%20Examination%20Survey/2

Re: [R] multiple imputed files

2015-01-26 Thread Anthony Damico
https://github.com/ajdamico/usgsd/search?utf8=%E2%9C%93&q=svyglm On Mon, Jan 26, 2015 at 10:30 AM, N F wrote: > Hi, > I think you want the {mitools} package. > http://cran.r-project.org/web/packages/mitools/mitools.pdf. Anthony > Damico's site, asdfree.com, has a lot of good c

Re: [R] multiple imputed files

2015-01-26 Thread Anthony Damico
On Mon, Jan 26, 2015 at 2:13 PM, hnlki wrote: > Thank you for your answers. In fact I am using the HFCS dataset, cool, so survey data. asdfree.com is a good place for examples. also, if you can match any officially-published statistics, i would love to collaborate on a post with you :) >

Re: [R] Subsetting data with svyglm

2015-02-11 Thread Anthony Damico
hi brennan, survey design objects can be subsetted with the same subset() syntax as data.frame objects, so following jeff's advice maybe you want svyglm( formula , design = subset( surveydesign , variable %in% c( 'value a' , 'value b' ) ) ) for some examples of how to construct a survey design wi

Re: [R] Error in svychisq and svyttest with svrepdesign

2015-03-10 Thread Anthony Damico
hi anabela, please provide a complete reproducible example. you need to use ?dput -- we are not able to import "dadosSPSS.sav" so we cannot recreate your problem in order to help you. thanks! http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On Tue, Mar 10

[R] iconv() replaces invalid characters with " " instead of " " (two spaces instead of one) on unix?

2015-03-14 Thread Anthony Damico
hello, i am trying to replace non-ASCII characters in a character string with a single space. the iconv() function works as i expect it to on windows, but on unix, non-ASCII characters are getting replaced with two spaces instead of one. i suppose i could write a workaround for my code, but i'm w

Re: [R] not a Stata version 5-12 .dta file

2015-03-19 Thread Anthony Damico
hi nicole, i have published easy to reproduce, well-documented code to download and then analyze every file from every wave of the world values survey here. the download automation script should solve your problem, or at least work around it :) http://www.asdfree.com/search/label/world%20values%

Re: [R] not a Stata version 5-12 .dta file

2015-03-19 Thread Anthony Damico
doesn't just running this solve your problem? https://github.com/ajdamico/usgsd/blob/master/World%20Values%20Survey/download%20all%20microdata.R On Fri, Mar 20, 2015 at 12:04 AM, Nicole Ford wrote: > Anthony, > > Thanks for this. The issue I am having is WVS didn’t save all of

Re: [R] Having trouble with gdata read in

2015-03-25 Thread Anthony Damico
maybe library(xlsx) tf <- tempfile() ami <- " http://www.ferc.gov/industries/electric/indus-act/demand-response/2008/survey/ami_survey_responses.xls " download.file( ami , tf , mode = 'wb' ) ami.data2008 <- read.xlsx( tf , sheetIndex = 1 ) On Wed, Mar 25, 2015 at 5:01 PM, Benjamin Baker wrot

Re: [R] Pseudo R squared for quantile regression with replicates

2014-09-18 Thread Anthony Damico
here is a reproducible example, mostly from ?withReplicates. i think something would have to be done using return.replicates=TRUE to manually compute survey-adjusted residuals, but i'm not really sure what nor whether the pseudo r^2 would be meaningful :/ library(survey) library(quantreg) data

Re: [R] Using "survey" package with ACS PUMS

2014-09-30 Thread Anthony Damico
hi michael, you probably need options( "survey.replicates.mse" = TRUE ) i also think you don't want type = "Fay" and you do want scale = 4/80 and rscales = rep( 1 , 80 ) as well, but what you have might be equivalent (not sure) regardless, this blog post details how to precisely replicate the

Re: [R] vcov function and cross terms

2014-10-15 Thread Anthony Damico
it might be slightly different, but i think the result is very close to a tsl result (which hasn't been implemented).. could you use this? mns<-svyby(~api00+api99, ~stype, rclus1, svytotal,covmat=TRUE) vcov(mns) On Wed, Oct 15, 2014 at 9:27 AM, Daniela Droguett < daniela.droguett.l...@gmail.c

Re: [R] "survey" package -- doesn't appear to match svy

2014-10-28 Thread Anthony Damico
could you provide a minimal reproducible example? perhaps use ?dput. in general the survey package matches all other languages http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Damico.pdf here's an example of a minimal reproducible example that does match http://www.ats.ucla.edu/stat

Re: [R] tapply error svyby function "survey" package

2014-11-12 Thread Anthony Damico
try resetting your levels? if that doesn't work, please dput() an example data set that we can test with :) thanks! sii.design <- update( sii.design , d6 = factor( d6 ) ) On Wed, Nov 12, 2014 at 7:59 AM, Martin Canon wrote: > Hi. > > > I'm trying to calculate the weighted mean score of a

Re: [R] tapply error svyby function "survey" package

2014-11-12 Thread Anthony Damico
"17", "18", "19", "20", "21", "22", "23", "24", "25"), class = "data.frame") sii.design <- svydesign( id = ~1, strata = ~stratum, weights = ~expfc, data = subset(sii.tesis, !is.na(stratum))) svyby(~ovt

Re: [R] SVYPLOT

2014-11-20 Thread Anthony Damico
survey:::svyplot.default with style="grayhex" calls hexbin:::gplot.hexbin an internet search turns up lots of people asking the question "how do i set xlim and ylim on hexbin plots?" but i don't see any easy solutions. :/ On Thu, Nov 20, 2014 at 10:31 AM, Raphael Fraser wrote: > Does not w

[R] r function idea: minimize() to turn reproducible_example.R into minimal_reproducible_example.R

2015-09-10 Thread Anthony Damico
just going to throw this idea out there in case it's something that anyone wants to pursue: if i have an R script and i'm hitting some unexpected behavior, there should be some way to remove extraneous objects and manipulations that never touch the line that i'm trying to reproduce. automatically s

Re: [R] help with svychisq

2015-09-10 Thread Anthony Damico
could you try this, and then not use factor(age) elsewhere? sv1 <- update( sv1 , age = factor( age ) ) if that doesn't work, is it possible for you to share a reproducible example? thanks On Thu, Sep 10, 2015 at 4:51 PM, Emanuele Mazzola wrote: > Hello, > > I’m having a weird issue with the f

[R] 32 bit windows version of r 3.2.2 crashes a lot at first internet connection attempts

2015-11-06 Thread Anthony Damico
hi, just throwing this out there. it's not clear to me how to reproduce the crashes, because they are sporadic (but common) guessing it's related to the switched default of setInternet2(TRUE) but not sure here's a semi-absurd screenshot http://s17.postimg.org/70omgtmi7/early_crashes.png i had

[R] .Internal(La_rs(x, FALSE)) crashes R after long (reproducible) script on windows only

2016-02-23 Thread Anthony Damico
hi, does anybody have a clue why .Internal(La_rs(x,FALSE)) is getting corrupted (actual detonation occurs within La_solve_cmplx within Lapack.c) on windows but not mac/unix? i have provided two (long) scripts that reproduce the problem and a third script modified to trigger the crash that unfortun

Re: [R] .Internal(La_rs(x, FALSE)) crashes R after long (reproducible) script on windows only

2016-02-23 Thread Anthony Damico
e On Tue, Feb 23, 2016 at 8:22 AM, Duncan Murdoch wrote: > On 23/02/2016 7:49 AM, Anthony Damico wrote: > >> hi, does anybody have a clue why .Internal(La_rs(x,FALSE)) is getting >> corrupted (actual detonation occurs within La_solve_cmplx within Lapack.c) >> on windows b

Re: [R] Loading large .pxt and .asc datasets causes issues.

2016-02-23 Thread Anthony Damico
nt.com/ajdamico/asdfree/master/Behavioral%20Risk%20Factor%20Surveillance%20System/download%20all%20microdata.R"; , prompt = FALSE , echo = TRUE ) On Tue, Feb 23, 2016 at 4:39 PM, Federman, Douglas < douglas.feder...@utoledo.edu> wrote: > You might want to look at Anthony Damico's

[R] is this an R bug or a DBI bug?

2016-02-27 Thread Anthony Damico
this happens with both SQLite and MonetDBLite, so i assume it is not an RSQLite bug. notice the gc() in the no-crash version.. thanks # initiate R with "C:\Program Files\R\R-3.2.3\bin\x64\Rterm.exe" --max-mem-size=35M library(RSQLite) db <- dbConnect( SQLite() ) for( i in 1:1000

Re: [R] is this an R bug or a DBI bug?

2016-02-28 Thread Anthony Damico
tested this out on 3.2.0, 3.2.1, and 3.2.2 -- only happens on 3.2.3, so i assume it was an R bug not a DBI bug. submitted here: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16734 On Sat, Feb 27, 2016 at 6:20 PM, Anthony Damico wrote: > this happens with both SQLite and MonetDBL

Re: [R] Using final sample weight in survey package

2016-04-04 Thread Anthony Damico
hi, probably not.. if your survey dataset has a complex design (like clusters/strata), you need to include them in the `svydesign` call. coercing an incorrect survey design into a replicate-weighted design will not fix the problem of failing to account for the sampling strategy On Mon, Apr 4, 201

Re: [R] Quantiles on multiply imputed survey data - mitools

2016-05-10 Thread Anthony Damico
is the `with` not passing make.formula( get( 'var_name' ) ) through to svyquantile for some reason? does this work? MIcombine( with(des, svyquantile(~LBXTCD, .5))) if that's not it, could you make a minimal reproducible example that includes the data download? code to download and import nhane

Re: [R] Quantiles on multiply imputed survey data - mitools

2016-05-11 Thread Anthony Damico
ta=imputationList(Imputed_list), nest=TRUE) > M_mean <- with(des_mult, svymean(make.formula(get('var_name' > summary(M_mean) > M_quantile <- with(des_mult, svyquantile(make.formula(get('var_name')), > quantiles = c(.5))) > summary(M_quantile) > > > Than

Re: [R] Significance of Svyrepdesign Object Warning

2016-10-23 Thread Anthony Damico
hi, great example. i am ccing survey package author/maintainer dr. lumley. why do you have `na.action=na.exclude`? if you remove it, things work as expected-- library(RCurl) library(survey) data <- getURL(" https://raw.githubusercontent.com/cbenjamin1821/careertech-ed/master/elsq1a

Re: [R] Resetting Baseline Level of Predictor in svyglm Function

2016-11-01 Thread Anthony Damico
hi, i think you want elsq1ch_brr <- update( elsq1ch_brr , F1HIMATH = relevel(F1HIMATH,"PreAlg or Less") ) On Mon, Oct 31, 2016 at 9:05 PM, Courtney Benjamin wrote: > Hello R Users: > > I am using the survey package in R for modeling with complex survey data. > I am trying to reset the basel

Re: [R] Archer-Lemeshow Goodness of Fit Test for Survey Data with Log. Regression

2016-11-17 Thread Anthony Damico
great minimal reproducible example, thanks. does something like this work? #Log. Reg. model-all curric. concentrations including F1RTRCC as a predictor allCC <- svyglm(formula=F3ATTAINB~F1PARED+BYINCOME+F1RACE+F1SEX+F1RGPP2+F1HIMATH+F1RTRCC,family="binomial",design=elsq1ch_brr,subset=BYSCTRL==1

Re: [R] Archer-Lemeshow Goodness of Fit Test for Survey Data with Log. Regression

2016-11-18 Thread Anthony Damico
(elsq1ch_brr)==nrow(newdesign) On Fri, Nov 18, 2016 at 5:06 AM, Courtney Benjamin wrote: > ​Thank you, Anthony. Your approach does work; however, I am concerned to > some degree about subsetting the data prior to creating the new svrepdesign > as I know that it is not recommended to subset

[R] [R-pkgs] New package queuecomputer

2016-12-01 Thread Anthony Ebert
e an issue on github. Kind regards, Anthony Ebert ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] Can you get the DEFT from svyratio?

2016-12-07 Thread Anthony Damico
hi, your code isn't runnable at fpc= ~M + Nbar) On Wed, Dec 7, 2016 at 5:03 PM, Chris Webb wrote: > To Dr. Lumley or anyone who may know the answer, > > I am trying to obtain ratio estimates from Levy and Lemeshow's Sampling of > Populations 4th ed. page 281. The results in the book

Re: [R] Problem in calculation of subpopulation mean in Survey package (Specify survey design with replicate weights)

2016-12-24 Thread Anthony Damico
hi, please revise your minimal reproducible example. the objects `W` and `bootstrap.results` do not exist. thanks On Fri, Dec 23, 2016 at 4:56 PM, Kristi Glover wrote: > Hi R users, > > I got a problem when I was trying to calculate the population mean for > different groups (classes) in using

Re: [R] how to extract weighted data in "survey" package

2017-01-01 Thread Anthony Damico
# load the survey library library(survey) # load the apistrat data.frame data(api) # look at the first six records head(apistrat) # look at the weight column only apistrat$pw On Sun, Jan 1, 2017 at 9:49 AM, Kristi Glover wrote: > Hi R Users, > > Happy New Year > > > I wanted to see the da

Re: [R] how to extract weighted data in "survey" package

2017-01-01 Thread Anthony Damico
sum(apistrat$api00*apistrat$pw)/sum(apistrat$pw) On Sun, Jan 1, 2017 at 11:11 AM, Kristi Glover wrote: > Thank You Anthony for the message. > > Why did not I get the same values in the following examples? > > To get the adjusted value, should not we just multiphy by weight? F

[R] if i paste this into my windows 3.3.2 R console, it crashes

2017-01-07 Thread Anthony Damico
hi, should i file this on https://bugs.r-project.org/ ? thanks # crash R with this command dir.create( "C:/My Directory/PEW/Hispanic Trends/2015/2013 Recontact Survey of Asian Ame ricans Field dates: 10/16/13 - 10/31/13 Respondents: Nationally-rep resentative sample of 802 Asian A

Re: [R] if i paste this into my windows 3.3.2 R console, it crashes

2017-01-07 Thread Anthony Damico
haha no doubt. just want to confirm this counts as a reportable bug ( https://www.r-project.org/bugs.html) before bothering r-core On Sat, Jan 7, 2017 at 5:51 AM, Jim Lemon wrote: > Hi Anthony, > I think you have included most of the forbidden characters in Windows > folder names

Re: [R] if i paste this into my windows 3.3.2 R console, it crashes

2017-01-07 Thread Anthony Damico
thanks! https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17206 On Sat, Jan 7, 2017 at 7:34 AM, Duncan Murdoch wrote: > On 07/01/2017 5:51 AM, Jim Lemon wrote: > >> Hi Anthony, >> I think you have included most of the forbidden characters in Windows >> folder names an

Re: [R] Does "coeftest" correctly use weights from "svydesign" in "svyglm" object?

2017-02-08 Thread Anthony Damico
hi, that setup is not correct. see examples in https://github.com/ajdamico/asdfree/tree/master/European%20Social%20Survey On Feb 8, 2017 11:54 PM, "André Grow" wrote: > Dear all, > > > > I am using data from the European Social Survey (ESS) and I would like to > calculate country-level cluster

[R] > quit('no')\nError: cannot allocate vector of size 512 Kb

2017-03-04 Thread Anthony Damico
this one is cute [damico@rocks010 ~]$ ulimit -v 15 [damico@rocks010 ~]$ R R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and comes with

[R] first readline() instance getting skipped on windows with R 3.3.3

2017-03-10 Thread Anthony Damico
hi, i'm curious if anyone else has noticed a change in behavior of readline()? i have a function in an R package that calls readline() here: https://github.com/ajdamico/lodown/blob/master/R/mics.R#L126 after upgrading to 3.3.3, the function appeared to start ignoring that readline() call. my fu

[R] R and GNUPLOT

2008-08-22 Thread Fristachi, Anthony
Hello, I am trying to send commands to GNUPLOT to load a .plt file that was generated with a C++ software module called with R, and to replot. I am able to open the program with shell.exec (below) but I am at a loss at what do next. Any suggestions?? shell.exec("C:\\ gnuplot \\ bin \\ wgnu

[R] Re-assigning variables stored as character strings in another variable

2010-02-22 Thread Anthony Damico
Is there any way to get the last line of this code to double the contents of a and b without naming them directly? #create variables a and b a<-5 b<-10 #store variable names a and b in variables c and d c<-"a" d<-"b" e<-c(c,d) #loop through both variables for (i in e){ #print the numbers five

[R] summated scale

2010-03-20 Thread Anthony Lopez
hello, I am new to R (convert from Stata) and I am wondering if there is an R command/function for generating a summated scale from, for example, four separate variables in a data set. In other words, I want to transform the variables x1, x2, x3, and x4 (which have high inter-item reliability) in

[R] contradictory output between ncv.test() and gvlma()

2010-04-05 Thread Anthony Lopez
Can anyone tell me why the ncv.test output and the gvlma output would be contradictory on the question of heteroscedasticity? Below, the ncv.test output reveals a problem with heteroscedasticity, but the gvlma output says that the assumptions are acceptable. How is this reconciled? > ncv.test(de

[R] categorical variable in scatterplot (car)

2010-04-24 Thread Anthony Lopez
this without recoding my variable? Thank you! Anthony [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

Re: [R] categorical variable in scatterplot (car)

2010-04-25 Thread Anthony Lopez
Thank you both for your helpful reply! And apologies for the lack of a reproducible example - I would/could send one now, but I believe Peter's example will suffice (and thank you for that). And making z a factor worked perfectly. Thank you! Anthony On Sun, Apr 25, 2010 at 10:20 AM,

[R] Prediction from BMA

2009-10-07 Thread Anthony Staines
7;t a predict.BMA or similar, that I can see. What's the recommended way to produce predictions (i.e. fitted values, or estimates from new data) from these BMA models? Best wishes, Anthony Staines -- Anthony Staines, Professor of Health Systems Research, School of Nursing, Dublin City University

[R] Memory Problems with CSV and Survey Objects

2009-10-23 Thread Anthony Damico
n able to get a database connection working after creating a svydesign object and not a svrepdesign object - and also because neither the DB SO website nor the svrepdesign help page make any mention of those parameters. The DB SOs are described in detail here: http://faculty.washington.edu/tluml

[R] Problem Removing Border Lines in Maps Package

2009-10-24 Thread Anthony Damico
I'm working with the nationwide county maps data, and trying to remove the internal county boundary lines. The only map() function parameter that I've found that gets me anywhere close to my desired result leaves small white segments on parts of the map. I believe this is due to the low resolutio

[R] Maptools runs out of memory installing the help files for spCbind-methods

2010-01-26 Thread Anthony Staines
in the bug tracker, or on the forums. Any suggestions? Am I missing something that it needs? Anthony -- Anthony Staines, Professor of Health Systems Research, School of Nursing, Dublin City University, Dublin 9,Ireland. Tel:- +353 1 700 7807. Mobile:- +353 86 606 9713 _

[R] [R-pkgs] rameritrade

2020-10-16 Thread Anthony Trevisan
Hello, I recently created a package that allows R users to trade through the TD Ameritrade API. With billions in assets and over 11 million clients, I am sure some R users could leverage the API. Best regards, Tony https://cran.r-project.org/web/packages/rameritrade/index.html https://tonytrevi

[R] [R-pkgs] fmpcloudr package

2020-11-05 Thread Anthony Trevisan
Hello, As recommended in https://r-pkgs.org/release.html , I wanted to notify the R community about a new package for accessing financial data metrics. The package fmpcloudr (https://CRAN.R-project.org/package=fmpcloudr

[R] [R-pkgs] Automated Investing - etrader

2020-12-01 Thread Anthony Trevisan
Hello, I wanted to notify the R community about a new package for trading on the ETRADE platform through an API. The package `etrader` ( https://CRAN.R-project.org/package=etrader ) interacts with the ETRADE API to allow for authentication, trading, acco

Re: [R] issue running svyglm after subsetting: NA/NaN/Inf in foreign function call (arg 1)

2022-09-30 Thread Anthony Damico
hi, that error happens before svyglm because the second parameter isn't a logical test? run `subset(rclus1, as.factor(stype=="E"))` and you'll see the same error.. if you remove the "as.factor" `subset(rclus1, (stype=="E"))` then the svyglm simply fails to converge but i think that's just too ma

Re: [R] Is there any design based two proportions z test?

2024-01-17 Thread Anthony Damico
hi, this guide to analyzing changes in prevalence rates over time with complex survey data might also help? thanks http://asdfree.com/trend-analysis-of-complex-survey-data.html On Wed, Jan 17, 2024, 9:15 AM John Fox wrote: > Dear Md Kamruzzaman, > > To answer your second question first, you

Re: [R] Creating a map in R using ACS PUMS data

2013-09-12 Thread Anthony Damico
the smallest boundary in the 1-year acs files is public use microdata area (puma), but the 3- and 5-year public use microdata samples (pums) go down to some counties, i believe.. http://www.census.gov/acs/www/guidance_for_data_users/estimates/ i think you just need to download the census bureau

Re: [R] accumulate() function in R?

2013-09-14 Thread Anthony Damico
maybe ?cumsum z <- 1:10 cumsum( z ) z <- sort( z ) cumsum( z )[ cumsum( z ) < 30 ] On Sat, Sep 14, 2013 at 10:36 PM, wrote: > I came from Python, newly learning R. is there something like accumulate() > in R? > > Example: > accumulate([1,2,3,4,5]) --> 1 3 6 10 15 > > Or perhaps I should sh

Re: [R] how to get a value from a list (using paste function)?

2012-12-18 Thread Anthony Damico
# use the mtcars data frame as your starting list. save it to x x <- as.list( mtcars ) # just print one column, by hand. x$wt # ..dynamically choose the column you want colname <- 'wt' # this breaks get( paste( 'x$' , colname , sep = "" ) ) # this works, but doesn't do what you want, since it'

Re: [R] Order variables automatically

2013-01-01 Thread Anthony Damico
# create an example data frame yourdata <- data.frame( cat1 = c( 1 , 0 , 1 ) , cont1 = c( 0 , 1 , 0 ) , cat2 = c( 0 , 0 , 1 ) ) # if this doesn't work for you, # please ?dput some example data in the future :) # figure out which variables contain the word 'cat' vars

Re: [R] Sas by function in R

2013-01-03 Thread Anthony Damico
https://www.google.com/search?q=multiple+histograms+R turns up a lot of possible answers.. what's your desired output and how does what you're trying to do differ from what's already been described on the web? :) On Thu, Jan 3, 2013 at 2:50 AM, catalin roibu wrote: > Hello, > It's an alternat

Re: [R] Version Controlled CRAN Packages

2013-01-03 Thread Anthony Damico
are you looking for the 'old sources' link shown on every package homepage on CRAN? http://cran.r-project.org/web/packages/ggplot2/ > 'old sources' > http://cran.r-project.org/src/contrib/Archive/ggplot2/ On Thu, Jan 3, 2013 at 9:33 AM, Mario Bourgoin wrote: > Dear Sir or Madam, > > The grou

Re: [R] Inserting percentile values in a data frame

2013-01-03 Thread Anthony Damico
it doesn't work because you're trying to save something of the wrong length into your data frame I used agr1$quantile <- quantile(agr1$cnt, probs=c(.50, .75, .90, .95, .99)) > # these two numbers should be the same nrow( agr1 ) length( agr1$quantile ) # these two numbers should be the same lengt

  1   2   3   >