Search results

  1. J

    Set operations/Anti_join

    Hi all, I'm trying to accomplish a set of tasks that involve set operations/joins. I'm able to solve a bit of this using packages from the Tidyverse. I can't figure out if there's a nicer way to do the last task, please below. The first task is self-explanatory. I have 3 vectors, and I'm...
  2. J

    proc traj

    No. If you've specified the model and interpretted the output correctly, and there's no evidence of unobserved heterogenity in response, why would you think trying to force it would be a good idea?
  3. J

    Logistic regression using Lasso

    I think HPGENSELECT will accomplish LASSO for Logistic Regression (and other GLMz)
  4. J

    Sums of Brownian Motions

    Hi all, I'm working through a textbook on SP and I'm trying to do some of the exercises. Here's the question followed by my attempt at a solution. For a standard brownian motion started at x=-3, find P(X1 + X2 > -1) Let Y = X1+X2 We want P(Y > -1) Finding the distribution of Y: E(Y) =...
  5. J

    Escape Characters?

    Update: I found a solution to the issue here: https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r Half the battle is knowing what to google lol. If anyone is interested, I can still post up what I have. Thanks again. Cheers
  6. J

    Escape Characters?

    Hi all, I'll attempt to explain what I'm running into though unfortunately I don't have a reproducible example. I'm attempting to load a custom font into R (done) to build a plot using ggplot (done). I'm doing this on Windows 10 if that matters. The font is an emoji-based font...
  7. J

    Iterating in R

    Thanks Dason! You're absolutely right it was way easier in base R. Thanks for the perspective. df <- data.frame(x1=c(1,9,10), x2=c(11,43,3)) df[df==1|df==2|df==3|df==4|df==5] <- NA > df x1 x2 1 NA 11 2 9 43 3 10 NA Any insight to as why the following doesn't work? df[df %in%...
  8. J

    Iterating in R

    Hi all, I want to perform a set of data management tasks that involves the following: -Input a data frame with an arbitrary number of columns, and column names, of numeric type. -Check each value (i.e. entry) to see if it meets a condition -If it does, replace the value so as an example: the...
  9. J

    Comparing variables

    This might be of some help: https://en.wikipedia.org/wiki/Geometric_mean
  10. J

    Hi Spunky, I recall you being versed in psychometric methods and was wondering if I could pick...

    Hi Spunky, I recall you being versed in psychometric methods and was wondering if I could pick your brain over something. I can't seem to send DMs, but if you are able to , could you kindly reach out? Best,
  11. J

    American Horror Story

    I cannot wait for the cross over this season. Season 3 ended up being (and still is) my all time favorite!!
  12. J

    American Horror Story

    The series definitely misses her but I feel it can stand on its own legs without her. Kathy Bates, Angela Basset, GaGa and a few other 'new' regulars keeps it fresh. AHS Apocalypse is looking really good so far...The guy playing Michael Langdon is from American Crime Story (Cody Fern) and is...
  13. J

    Submission of package to CRAN: problem grasping an Error

    I thought I saw something on CRAN the other week by him, but will let him confirm. Again, apologies we couldn't be of more help. I'm still new to CRAN submissions and building packages in general myself.
  14. J

    Too many dummy variables in Regression

    Can you group the 50,000 models into far fewer categories in a meaningful way? E.g. 'Samsung','Apple',etc or limit your focus to recent phone models? I'm guessing you have (for example) all Apple iPhones (2g, 3g, 3gs, etc.) in your data set? Are all relevant for your current problem at hand? I...
  15. J

    Analysis of case-control

    What are your data sources? Are you analyzing population level data? If so, the GEE approach (i.e. marginal) is probably the best choice. The interpretation of coefficients would be 'population-averaged' - averaged over the distribution of random effects you get from a conditional model, where...
  16. J

    Testing significance of infection rate decrease?

    Sounds like your work might be a good fit for an Interrupted Time Series (ITS) model.
  17. J

    Visualising hierarchical multiple regression

    No problem. It sounds like you might be from a behavioral science background (from where I also hail) and I know the terminology can be different. For example if you were to say mixed model, you might mean one between factor and one within factor, where as in other areas, people might interpret...
  18. J

    Visualising hierarchical multiple regression

    When you say hierarchical multiple regression do you mean: (1) You've added independent variables into the final model in stages (e.g. model with 1 IV, model with 1IV and another, etc, etc) or (2) A regression model with random effects (which can be viewed as a Multilevel Model) I believe...
  19. J

    ANOVA or Poisson Regression

    Hi j58, Many thanks for your reply and valuable insights. I'll definitely look into the assumptions of the ANOVA more closely when I get back into the office. I like the idea of a random intercept model in the logit approach to capture variability - will bring these back to the group. Best,
  20. J

    ANOVA or Poisson Regression

    Hi all, I want to get some feedback on the approaches I've considered for an analysis. Here is the setup Unit of analysis: Physician Variables: Physician Specialty, Number of Total Patients they take care of, Number of patients who are diabetic. A typical line of data looks like this...