Questions tagged [multi-level]

529 questions
6
votes
1 answer

Multi-level regression model on multiply imputed data set in R (Amelia, zelig, lme4)

I am trying to run a multi-level model on multiply imputed data (created with Amelia); the sample is based on a clustered sample with group = 24, N= 150. library("ZeligMultilevel") ML.model.0 <- zelig(dv~1 + tag(1|group),…
TiF
  • 615
  • 2
  • 12
  • 24
6
votes
2 answers

Between/within standard deviations

When working on a hierarchical/multilevel/panel dataset, it may be very useful to adopt a package which returns the within- and between-group standard deviations of the available variables. This is something that with the following data in Stata…
Stefano Lombardi
  • 1,581
  • 2
  • 22
  • 48
5
votes
0 answers

Multilevel Multiple Imputation (MICE) with categorical/factor variable?

I have a dataset where I am trying to use multiple imputation with the packages mice, miceadds and micemd for a categorical/factor variable in a multilevel setting. I am able to use the method 2l.2stage.pois for a continuous variable, which works…
Marco Pastor Mayo
  • 803
  • 11
  • 25
5
votes
1 answer

Does R support multi-level namespaces?

Is it possible to have a function in R under multiple levels of namespaces? For example, can these functions exist? Mymath::Trig::cosine( ) A::B::C::D::foo( )
Chris
  • 748
  • 2
  • 8
  • 23
5
votes
1 answer

Three-level partially nested model

I am modeling change over time in group psychotherapy subjects using R and lme4. My data have the following structure: subject (id) time (code 1-10 for equally spaced repeated measures) outcome (for every repeated measure) treatment (0/1 for…
Claudiu Papasteri
  • 2,469
  • 1
  • 17
  • 30
5
votes
1 answer

RStan: Specifying a Three-Level Random Slopes Model?

I've been working on a three-level RStan model where repeated broadband measurements (year ID = yrid) are nested within local authorities (LA ID = laid), which are finally nested within regions (region ID = rnid). The (logged)dependent variable is…
Thirst for Knowledge
  • 1,606
  • 2
  • 26
  • 43
5
votes
1 answer

Evaluating the ikelihood function in linear mixed models (lme4)

I am currently writing a script to evaluate the (restricted) log-likelihood function for use in linear mixed models. I need it to calculate the likelihood of a model with some parameters fixed to arbitrary values. Maybe this script is helpful to…
SimonG
  • 4,701
  • 3
  • 20
  • 31
5
votes
1 answer

Scrapy CrawlSpider: how to access item across different levels of parsing

I'm crawling a web site (only two levels deep), and I want to scrape information from sites on both levels. The problem I'm running into, is I want to fill out the fields of one item with information from both levels. How do I do this? I was…
Andrew Chen
  • 373
  • 1
  • 7
  • 16
4
votes
2 answers

Adapting a HTML/CSS dropdown menu to multi-level

Ive been trying to make the original dropdown into multi level for a site im working on. All of my attempts have failed (. For some reason i can only do "margin-right" to align the elements, and this causes some problems. I think it has something to…
Adam Nygate
  • 325
  • 3
  • 14
4
votes
7 answers

Getting Items from Dictionary by key

I have this structure: static Dictionary> tasks = new Dictionary>(); it looks like that [1]([8] => "str1") [3]([8] => "str2") [2]([6] => "str3") [5]([6] => "str4") I want to get from…
SexyMF
  • 10,657
  • 33
  • 102
  • 206
4
votes
1 answer

model failed to converge or not in r (lme4)

(the data is not my data, but from stack overflow website) library(lme4) read.table(textConnection("duration season sites effect 4d mon s1 7305.91 4d mon s2 856.297 …
yoo
  • 491
  • 3
  • 10
4
votes
0 answers

R Is it possible to use Generalised Additive Models for Location Scale and Shape (GAMLSS) in a multilevel dataset and plot percentiles?

Im trying to plot continuous percentiles of a variable against another variable. Ive found the package gamlss which lets me do pretty much that. data(iris) (gamlss) (gamm4) r1<-gamlss(Sepal.Length~cs(Sepal.Width, 3), sigma.formula=~cs(Sepal.Width,…
Jajo123
  • 75
  • 4
4
votes
1 answer

Do multi level grouping and summing using Java Stream API

I have a class public class Person { private String name; private String country; private String city; private String pet; private int totalCountryToCityCount; private int petCount; public Person(String name, String…
Ashish Saraswat
  • 239
  • 1
  • 2
  • 5
4
votes
1 answer

How to make the height of dropdown menu same as the height of submenu in bootstrap 4

I am making a navbar with multi level drop down menu. I want to make the height of drop-down menu same as the height of sub-menu. Like This: When the sub-menu is hidden, the drop-down menu will return the original size. Like This: Here is my…
AlexLam
  • 41
  • 1
  • 5
4
votes
2 answers

How to append to multilevel pandas dataframe using iteration?

I'm trying to download and organize data from Yahoo Finance using data_reader. The procedure is simple: For every stock I do the following: aapl = data.DataReader('AAPL', 'yahoo', '2004-01-01') del aapl['Close'] aapl.rename(columns={'Adj Close':…
hernanavella
  • 5,462
  • 8
  • 47
  • 84
1
2
3
35 36