Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision afc6a064bff28609a373b20d7fb0cca9197ea0f1 authored by Aditya Bhat on 30 April 2019, 20:00:34 UTC, committed by cran-robot on 30 April 2019, 20:00:34 UTC
version 0.8.1
1 parent c80b731
  • Files
  • Changes
  • bbfaab0
  • /
  • man
  • /
  • plots.Rd
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:afc6a064bff28609a373b20d7fb0cca9197ea0f1
directory badge Iframe embedding
swh:1:dir:cf672b9412d3ca8dc0f5745e648c6b8e85fff8d2
content badge Iframe embedding
swh:1:cnt:de4bbf5758734bd2f6f4303f9e925e13a0b24856
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
plots.Rd
\name{plotDiagnostic}
\alias{plotDiagnostic}
\alias{plotLikelihood}
\alias{plotHLSM.random.fit}
\alias{plotHLSM.fixed.fit}
\alias{plotHLSM.LS}

\title{built-in plot functions for HLSM object}

\description{ 
 plotLikelihood( ) plots the likelihood, and plotDiagnostic( ) plots diagnostic-plot of posterior draws of the parameters from MCMC sample. plotHLSM.random.fit( ) and plotHLSM.fixed.fit( ) are functions to plot mean-results from fitted models, and plotHLSM.LS( ) is for plotting the mean latent position estimates.
}

\usage{
	plotLikelihood(object,burnin = 0, thin = 1)
	plotDiagnostic(chain)
	plotHLSM.random.fit(fitted.model,parameter,burnin=0,thin=1)
	plotHLSM.fixed.fit(fitted.model, parameter,burnin=0,thin=1)
	plotHLSM.LS(fitted.model,pdfname=NULL,burnin=0,thin=1,...)
}


\arguments{

	\item{object}{object of class 'HLSM' obtained as an output from \code{HLSMrandomEF()} or \code{HLSMfixedEF()}
}
	\item{fitted.model}{model fit from either HLSMrandomEF() or HLSMfixedEF()}
	\item{parameter}{parameter to plot; specified as \code{Beta} for slope coefficients, \code{Intercept} for intercept, and \code{Alpha} for intervention effect}
	\item{pdfname}{character to specify the name of the pdf to save the plot if desired. Default is NULL}
        \item{burnin}{numeric value to burn the chain for plotting the results from the 'HLSM'object }
	\item{thin}{a numeric thinning value}
	\item{chain}{a numeric vector of posterior draws of parameter of interest.}
	\item{...}{other options}
}


\value{
 returns plot objects.
}


\author{Sam Adhikari}

\examples{
#using advice seeking network of teachers in 15 schools
#to fit the data

#Random effect model#
priors = NULL
tune = NULL
initialVals = NULL
niter = 10

random.fit = HLSMrandomEF(Y = ps.advice.mat,FullX = ps.edge.vars.mat,
	initialVals = initialVals,priors = priors,
	tune = tune,tuneIn = FALSE,dd = 2,niter = niter,
	intervention = 0)

plotLikelihood(random.fit)

intercept = getIntercept(random.fit)
dim(intercept) ##is an array of dimension niter by 15
plotDiagnostic(intercept[,1])
plotHLSM.LS(random.fit)
plotHLSM.random.fit(random.fit,parameter = 'Beta')
plotHLSM.random.fit(random.fit,parameter = 'Intercept')
##look at the diagnostic plot of intercept for the first school


}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top