Search found 11 matches

by sfcheung
Thu Aug 04, 2022 1:01 am
Forum: Module development
Topic: Save an object to be reused by other modules?
Replies: 1
Views: 2568

Save an object to be reused by other modules?

I successfully wrote one or two modules but they are "standalone", work independent of others. Can a module save an object that can be accessed by other modules? If yes, how can a module find and access these objects? A common workflow in R is calling a main function to do an analysis, and...
by sfcheung
Tue Mar 01, 2022 6:29 am
Forum: Module development
Topic: Adding references to the output
Replies: 2
Views: 1572

Re: Adding references to the output

Many thanks for the examples! I will try them in my modules.

-- Shu Fai
by sfcheung
Tue Mar 01, 2022 12:28 am
Forum: Module development
Topic: Adding references to the output
Replies: 2
Views: 1572

Adding references to the output

By default, some references are added to the output. I like this feature because they can help users want to read to understand more about the results.

Is there any way for a module to add more references this way? Should we do this through the Results element?

-- Shu Fai
by sfcheung
Mon Feb 28, 2022 9:38 am
Forum: Module development
Topic: Adding a new variable to the dataset?
Replies: 7
Views: 2280

Re: Adding a new variable to the dataset?

I did not notice that there must be a check box for it to work. It works now! Many many thanks!

-- Shu Fai
by sfcheung
Mon Feb 28, 2022 1:22 am
Forum: Module development
Topic: Adding a new variable to the dataset?
Replies: 7
Views: 2280

Re: Adding a new variable to the dataset?

This is the test repo: https://github.com/sfcheung/jmvtest This is how the output is set up: https://github.com/sfcheung/jmvtest/blob/69136adc151b08361909b67e8f96c116b9c3372b/jamovi/hatvalues.r.yaml#L33-L41 This is my attempt to save the variable: https://github.com/sfcheung/jmvtest/blob/69136adc151...
by sfcheung
Sun Feb 27, 2022 4:02 pm
Forum: Module development
Topic: Adding a new variable to the dataset?
Replies: 7
Views: 2280

Re: Adding a new variable to the dataset?

I tried to understand how to add variables but failed, for now. This is what I added in *.r.yaml: - name: hv type: Output title: Leverage varTitle: Leverage varDescription: Leverage measureType: continuous clearWith: - dv - iv This is what I tried in the .run function, used "0s" just for t...
by sfcheung
Thu Feb 24, 2022 3:12 am
Forum: Statistics
Topic: hat values in regression?
Replies: 2
Views: 1450

Re: hat values in regression?

Sorry for the confusion caused. By hat values I meant the values of leverage reported in SPSS or hatvalues() in the stats package (previously in the car package, if I recall correctly). This is an example: set.seed(487053) n <- 100 x <- rnorm(n) y <- .6 * x + rnorm(n, 0, sqrt(1 - .6^2)) fit <- lm(y ...
by sfcheung
Wed Feb 23, 2022 5:26 am
Forum: Module development
Topic: Adding a new variable to the dataset?
Replies: 7
Views: 2280

Re: Adding a new variable to the dataset?

Thanks a lot for your prompt reply! I will take a look and learn how it works.

-- Shu Fai
by sfcheung
Wed Feb 23, 2022 3:13 am
Forum: Module development
Topic: Adding a new variable to the dataset?
Replies: 7
Views: 2280

Adding a new variable to the dataset?

Please pardon me for asking a naive question. I believe this is a basic task in writing module. However, I tried searching the forum but my search was rejected, saying that my search terms are too common. When writing a module, how can we add new variables to the data set, like Linear Regression tha...
by sfcheung
Tue Feb 22, 2022 6:02 pm
Forum: Statistics
Topic: Linear regression with interaction vs medmod analysis
Replies: 1
Views: 2156

Re: Linear regression with interaction vs medmod analysis

According to this post: https://blog.jamovi.org/2017/09/25/medmod.html medmod uses lavaan to fit a model. I am not sure about the settings it uses for lavaan. If it uses the default options, then maximum likelihood is used as the estimation method. The results can be slightly different from those by...