GithubHelp home page GithubHelp logo

gden173 / vspglm Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.53 MB

All MATLAB Code and examples related to a Semi-Parametric Vector Generalized Linear Model Solver. The univariate case of this method was first proposed by Huang (2014) in Joint Estimation of the Mean and Error Distribution in Generalized Linear Models https://doi.org/10.1080/01621459.2013.824892

License: MIT License

MATLAB 100.00%
glm matlab optimization statistics

vspglm's Introduction

vspglm

Description

All MATLAB Code and examples related to a Semi-Parametric Vector Generalized Linear Model Solver. The univariate case of this method was first proposed by Huang (2014) in Joint Estimation of the Mean and Error Distribution in Generalized Linear Models https://doi.org/10.1080/01621459.2013.824892

Sorbinal Example PMFs Example of multivariate PMFs for the sorbinil dataset (See Examples)

More information on this function can be found here

Usage

This function uses MATLABs Optimization toolbox and MATLAB >= 2019b.

To use the function, clone the repository and add the function to your MATLABPATH

$ git clone https://github.com/gden173/vspglm.git

Then open this as your current working directory in MATLAB and run the following command in the command window

>> addpath('src', '-end')

This should add the vspglm function to your MATLABPATH variable. This can be checked by running

>> matlabpath

		MATLABPATH
		.
		.
		.

	/path/to/vspglm

Where the path to the cloned directory should be at the end of the matlabpath environment variable.
This is only temporary, and will have to be rerun every MATLAB session. To run the scripts in the examples directory, while in the same directory run

>> addpath('examples', '-end')

from the command window.

Examples

Examples usages can be found in `examples`. The basic usage of the `fit_vspglm` function can be found by searching some of the documentation.
>> help fit_vspglm
  vspglm_mmodel = fit_vspglm(formula, tbl,  links)
  fits a vector generalized semi-parametric linear model and stores
  the model output in vspglmmodel
  the function currently takes 3 arguments,
  formula, a string array of string formulas 
  In the formula argument:
             (y1, y2) ~ (x1, x3) -> y1 and y2 share all regression
             coefficients
             (y1, y2) ~ (x1, (x2&0), (0&x3)) 
             -> y1 ~ x1 + x2, y2 ~ x1 + x3
  Responses can also  have a different number of covariates and still 
  share regression coefficients. 
           (y1, y2, y3) ~ (x1,(x2&x2&0), (0&0&x3))
  This means that 
                 y1 ~ 1  + x1  + x2
                 y2 ~ 1  + x1  + x2
                 y3 ~ 1  + x1  + x3    
 
  Where each variable y1, .., yk, x1, .., xp are columns in 
  the table argument tbl. 
  The last argument is then links, a 1 x k cell array of the link
  functions to be used for each model.

>> 

once the src directory has been added to path.

Docs

For the technical implementation of the model, see the documentation.

Author

  • Gabriel Dennis (@gden173)

vspglm's People

Contributors

gden173 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.