Skip to content

Instantly share code, notes, and snippets.

@samuelsaari
samuelsaari / z1det_MVE_biofam_POSSIBLE_SOLUTION.R
Last active November 17, 2022 16:46
Latent Class Growth Modelling with multinomial response in R - attempt to solve
#-------------------------------------------------------------------------------------------------
# libraries
rm(list=ls())
# install.packages("TraMineR") # example data
# install.packages("OpenRepGrid")# random words for headings
# install.packages("khroma") # color palletttes
# install.packages("tidyverse")
# install.packages("modeldb")
# install.packages("car")
def add_edge(a,b,x):
graph[a][b]+=x
n=5
graph=[[0]*(n+1) for _ in range(n+1)]
seen=[False]*(n+1)
path=[]
verbose=False
from random import randint
class Risk:
def __init__(self):
self.results_counter=[0]*3
self.percentages=[None]*3
def throw_dice(self):
import sqlite3
import os
os.chdir(os.path.dirname(__file__))
print(os.getcwd())
db = sqlite3.connect("bikes.db")
db.isolation_level = None
def distance_of_user(user):
// use, merge and append share-modules with ease:
// Usage:
* simply type "share" before use,merge and append commands
* replace path with "module wave", e.g. "dn 9", see examples below
// Setup:
* copy-paste the share-programme in the beginning of your do-file (or in profile.do so that the programme is loaded automatically when you launch stata)
* check the lines with "NB!" below. You will need to make some minor changes to the code in order to update the directories, release numbers etc.
//Credit: