Git Product home page Git Product logo

greg's People

Contributors

gforge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

greg's Issues

prPhEstimate' not found

Dear gforge
I use your function plotHR in the package of Greg and run the example from https://rdrr.io/cran/Greg/man/plotHR.html. But unfortunately, the program has the following error
"Error in fastDoCall(prPhEstimate, est_list) :
object 'prPhEstimate' not found"
I do not know whether it was because of a problem with my computer system or an R version of the problem. Could you please do me a favor to find an way to solve this problem?
Thank you very much for your time and consideration. I am looking forward to hearing from you.
With kind regards, Yours sincerely,gxb
_ud q5 lofci3ijox01i4

`robcov` or `robcovalt` on `lm` models?

This is more of a query. Following http://stackoverflow.com/questions/8389843/clustered-standard-errors-r-panel-data/8390880#8390880 I discovered robcov in rms and then robcovalt in Greg. However it seems that both these functions work exclusively with ols models from rms, but NOT with lm models.

Are you aware of any function that allows clustering (like robcov does) but for lm models? (Before checking out Greg, I was hoping that robcovalt would extend robcov to lm models, but this doesn't seem to be the case.)

printCrudeAndAdjustedModel gives error when only using two levels

Issue 1. It looks as though printCrudeAndAdjustedModel needs at least 3 levels when using "desc_column=TRUE". So when sex (m/f) has no missing (thus only 2 levels), it will give an error. When sex (m/f) has missing (thus, three levels=m/f/NA), it works fine.

Issue 2. Is there a way to get "desc_column" to only show the number of observations actually used in the analysis? When a person has a lot of missing data and does a complete case analysis, the desc_column becomes really uninformative.

Otherwise, thank you for an amazing package!! It has been so useful!

library(Gmisc)
library(Greg)
library(Hmisc)
library(htmlTable)
data <- data.frame(outcome=rnorm(100),sex=sample(c("Male","Female"),100,TRUE),country=sample(c("USA","UK","AUS"),100,TRUE))

data$sex <- factor(data$sex,levels=c("Male","Female"))
data$country <- factor(data$country,levels=c("USA","UK","AUS"))

fit <- lm(outcome ~ sex + country, data=data)
printCrudeAndAdjustedModel(fit,desc_column=TRUE)

data$sex[1] <- NA
printCrudeAndAdjustedModel(fit,desc_column=TRUE)

Error in library(Greg) : there is no package called 'Greg'

Hello,

I can´t seem to add this package anymore. I am coming back to some code I was working on a couple years ago and its not letting me install the package. I´ve tried install.packages('Greg', dependencies=TRUE, repos='http://cran.rstudio.com/')

Then I get this:

Installing package into '/Users/stefanthorarensen/Library/R/3.1/library'
(as 'lib' is unspecified)

package 'Greg' is available as a source package but not as a binary

Warning in install.packages :
package 'Greg' is not available (for R version 3.1.2)

Any suggestions would be greatly appreciated.

etm dependency

Greg seems to have dependency on the etm package, which was removed from CRAN. Using R version 4,.0.2, loading Greg gives the following error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘etm’

Would be great if you could look into it!

error in event status

Hello,

When I try to use timeSplitter() to split up my data for cox survival into small time increments, I get the following error:

Error in timeSplitter(Number_days_lived, by = 5, event_var = "event", :
The event status should be among the levels in the event variable. Currently 'alive' is not found among 'dead', 'censored'.

It's because I had my regular cox survival model set up the regular way so that each individual was either "dead" or "censored"; the time variable was the number of days until death, so individuals that died before the end of the experiment received "dead" and those that made it to the end received "censored". It was implied that they were all alive until either they died or the experiment ended, so "alive" is not a status in the event variable.

How do I get timeSplitter to work in this situation? Temporarily I've changed one individual's event status to "alive" just to get it to run, but won't be able to leave it that way.

Thanks!!!

-Carrie

Rownames "intercept"

Hello,

I found your blog and packages while learning how to use R markdown. There are very useful, thank you !
Actually I encountered a "bug" using the function getCrudeAndAdjustedModelData with a glm model. It was due to the fact that the intercept term is called "(Intercept)" in the glm model. So the check for equal rownames fails as you name it "intercept" in the unadjusted model (without brackets). I solved it by replacing line 135 by:
rownames(unadjusted)[1] <- variable

I don't know if it's the right way to propose a suggestion for your code (I just created my GitHub account to be able to contact you as I thought it could help in exchange for the help you provided me with your blog).

Victor

How to edit the rownames

I am not able to edit the rownames after producing a forest plot with the function forestplotCombineRegrObj where I plotted HR (hazard ratio) for relevant variables from multiple cox models.

I provided the reference.names for each model as well as the varialblesOfInterest.regexp. In the rows I want to remove the labels of the variablesOfInterest in the plot and just have the reference.names. Cannot find a neat way of doing this.

Also, cannot find a function to add the confidence intervals to be shown, along with the HR.

Any help would be welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.