Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16729#discussion_r105566816
  
    --- Diff: R/pkg/vignettes/sparkr-vignettes.Rmd ---
    @@ -700,12 +702,13 @@ head(select(gaussianFitted, "model", "prediction", 
"mpg", "wt", "hp"))
     
     The following is the same fit using the tweedie family:
     ```{r}
    -tweedieGLM1 <- spark.glm(carsDF, mpg ~ wt + hp, family = 
SparkR:::tweedie(0.0))
    +tweedieGLM1 <- spark.glm(carsDF, mpg ~ wt + hp, family = "tweedie", 
variancePower = 0.0)
     summary(tweedieGLM1)
     ```
     We can try other distributions in the tweedie family, for example, a 
compound Poisson distribution with a log link:
     ```{r}
    -tweedieGLM2 <- spark.glm(carsDF, mpg ~ wt + hp, family = 
SparkR:::tweedie(1.2, 0.0))
    +tweedieGLM2 <- spark.glm(carsDF, mpg ~ wt + hp, family = "tweedie", 
    +                         variancePower = 1.2, linkPower = 0.0)
     summary(tweedieGLM2)
    --- End diff --
    
    let's add an example with `statmod` too? either here or in roxygen2 API doc 
(later might be a better place?)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to