Re: [R] FW: problem with markov random field smooths in mgcv

2020-03-18 Thread Wilcox, Chris (O&A, Hobart)
Hi David, Thanks for the comments. I am running the analysis on a mac OS 10.12.6, using R R 3.5.3 GUI 1.70 El Capitan build (7632), and mgcv 1.8-31. I am aware of the procedure of using data = "xx" in a call to gam. I am having a strange issue locally, in that gam does not see to be able to

Re: [R] row combining 2972 files

2020-03-18 Thread Yuan Chun Ding
Hi Denes, thank you very much for your mesasge!! I would like to learn from you. We generated preliminary data for a new project, so performing explorative analysis. since only sample size is relative small, I probably will both Cox regression and firth's Cox regresion. there are 2972 markers;

Re: [R] row combining 2972 files

2020-03-18 Thread Yuan Chun Ding
Hi Bert, Yes, your code works very well. Thank you very much!! Ding From: Bert Gunter [bgunter.4...@gmail.com] Sent: Wednesday, March 18, 2020 1:02 PM To: Yuan Chun Ding Cc: r-help mailing list Subject: Re: [R] row combining 2972 files Untested in the absence o

Re: [R] row combining 2972 files

2020-03-18 Thread Dénes Tóth
On 3/18/20 9:02 PM, Bert Gunter wrote: Untested in the absence of example data, but I think combined <- do.call(rbind, lapply(ls2972, function(x)get(x)[[2]])) Or if you have largish data, use rbindlist() from the data.table package: combined <- data.table::rbindlist( lapply(ls2972, funct

[R] Model frame of lme objects

2020-03-18 Thread helios.derosario
From a linear model like `mod <- lm(y ~ x)`, I can obtain a data frame with all the variables involved in the model (in that case, `y` and `x`). How could I get a similar data frame from an lme object, e.g. fitted as `mod <- lme(y ~ x, random=~1|g)` ? I know that `getData` might work if the

Re: [R] Code seems OK (no warnings, no error messages) but no results

2020-03-18 Thread varin sacha via R-help
Dear R Experts, So I managed to get the first part of my R code to work with one error message but R still gives me the result I am looking for. Now I'm trying to calculate the bootstrap confidence interval around the "MSE_fastMM" value. The end of my code after mean(my.data) does not work (err

Re: [R] row combining 2972 files

2020-03-18 Thread Bert Gunter
Untested in the absence of example data, but I think combined <- do.call(rbind, lapply(ls2972, function(x)get(x)[[2]])) should do it. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom Co

[R] row combining 2972 files

2020-03-18 Thread Yuan Chun Ding
Hi R users, I generated 2972 list files in R, each list includes four data frame files , file names for those list file are VNTR13576, VNTR14689, etc. the second data frame in each list has the same 11 column names, but different number of rows. I can combine two dataframes by list2972 <-ls(pa

Re: [R] How to evaluate impact of factors on parameters

2020-03-18 Thread Richard M. Heiberger
Unfortunately, sending HTML mail scrambled the correct use of dput. Please use "plain text mode" for all R mailing lists. I unscrambled it here df_test <- structure(list(pc.col = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label =

Re: [R] FW: problem with markov random field smooths in mgcv

2020-03-18 Thread David Winsemius
On 3/18/20 12:44 AM, Wilcox, Chris (O&A, Hobart) wrote: Hi all, I am trying to fit a model with a markov random field smooth in mgcv. I am having some trouble with getting it to run, and in particular I am getting the message Error in initial.sp(w * x, S, off) : S[[1]] ma

[R] How to evaluate impact of factors on parameters

2020-03-18 Thread lionel sicot via R-help
Hello, One of my colleagues sent me a csv file with 12 columns and a lot of rows. Column1 to Column10 are factors with 2 to 6 levels. Column11 and Column12 are experimental results.I'm a bit lost with all these data. I would like- to determine which factors have the most impact, and in which way

[R] post new question

2020-03-18 Thread olivia mah
Hi, I am interested in running sensitivity analysis (variance-based). But instead of running Monte Carlo simulations in R, I already have my sample data in two tables. So how do I run Sobol on my own data then? Does that mean that the model = null? And then to use tell()? I cannot find any exampl

[R] FW: problem with markov random field smooths in mgcv

2020-03-18 Thread Wilcox, Chris (O&A, Hobart)
Hi all, I am trying to fit a model with a markov random field smooth in mgcv. I am having some trouble with getting it to run, and in particular I am getting the message Error in initial.sp(w * x, S, off) : S[[1]] matrix is not +ve definite. After reading everything I

[R] Extract NASA VIIRS data in R

2020-03-18 Thread Miluji Sb
Dear all, Hope everyone is keeping safe. I am trying to extract/read VIIRS nighttime lights data but the output seems rather strange. I have uploaded the file here so as not exceed the size limit of the email. ## Code ## libra

Re: [R] Code seems OK (no warnings, no error messages) but no results

2020-03-18 Thread peter dalgaard
The double curlies in > my.experiment <- function() {{ look suspicious. -pd > On 16 Mar 2020, at 22:08 , varin sacha via R-help > wrote: > > Good afternoon, > > Here below my reproducible R code. I don't get any results. I am looking for > MSE_fastMM value and the bootstrap CIs around MS