multi-level

Reshape/gather function to create dataset ready for multilevel analysis

送分小仙女□ 提交于 2019-12-04 02:13:42
问题 I have a big dataset, with 240 cases representing 240 patients. They all have undergone neuropsychological tests and filled in questionnaires. Additionally, their significant others (hereafter: proxies) have also filled in questionnaires. Since 'patient' and 'proxy' are nested in 'couples', I want to conduct a multilevel analysis in R. For this, I need to reshape my dataset to run those kind of analysis. Simply said, I want to 'duplicate' my rows. For the double subject IDs add a new variable

asp.net databound menu multilevel

巧了我就是萌 提交于 2019-12-03 09:08:16
I am currently using an asp.net menu control to load from a table parent/child items. The problem I am having is that if the child has another child. My code is kindof static in that sense and I can't seem to find a better or "the" way to do it. I have seen sitemap as datasources but i don't need a sitemap and feel that would just be overkill for what I need to achieve. foreach (ClassName option in list) { MenuItem module = new MenuItem(option.Description.ToLower(), "", "", option.Url + "?option=" + option.Optionid); module.Selectable = true; navigation.Items.Add(module); //this is my second

Between/within standard deviations in R

北慕城南 提交于 2019-11-30 14:12:04
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 can be easily done through the command xtsum, i(momid) I made a research, but I cannot find any R package which can do that.. edit: Just to fix ideas, an example of hierarchical dataset could be this: son_id mom_id hispanic mom_smoke son_birthweigth 1 1 1 1 3950 2 1 1 0 3890 3 1 1 0 3990 1 2 0 1 4200 2 2 0 1 4120 1 3 0 0 2975 2 3 0 1 2980 The

Issue with Expanding Multi-Level ExpandableListView

不想你离开。 提交于 2019-11-27 14:09:35
I have a multi level (3 levels, Root -> Parent -> Child) ExpandableListView containing children that are also ExpandableListViews. I'm having no issue filling them up; however, I need to expand a specific item in the Parent level when I first display the Activity (onCreate). I successfully expand the related Root item of the Parent but I can't seem to expand the Parent item. The given listeners are called and yet the result isn't reflected in my multi level list. Activity in which I call the expansion: public class Activity { private int groupToExpand = 4, childToExpand = 3; protected void

How to simply add a column level to a pandas dataframe

帅比萌擦擦* 提交于 2019-11-27 12:43:49
问题 let say I have a dataframe that looks like this: df = pd.DataFrame(index=list('abcde'), data={'A': range(5), 'B': range(5)}) df Out[92]: A B a 0 0 b 1 1 c 2 2 d 3 3 e 4 4 Asumming that this dataframe already exist, how can I simply add a level 'C' to the column index so I get this: df Out[92]: A B C C a 0 0 b 1 1 c 2 2 d 3 3 e 4 4 I saw SO anwser like this python/pandas: how to combine two dataframes into one with hierarchical column index? but this concat different dataframe instead of

How to use nested problems in OpenMDAO 1.x?

五迷三道 提交于 2019-11-27 09:36:19
I am trying to implement Collaborative Optimization & other multi-level architectures on OpenMDAO. I read here that this can be done by defining a separate solve_nonlinear method in the Subclass of Problem. The issue is that while running the problem instance the defined solve_linear is not being called. Here is the code - from __future__ import print_function, division import numpy as np import time from openmdao.api import Component,Group, IndepVarComp, ExecComp,\ Problem, ScipyOptimizer, NLGaussSeidel, ScipyGMRES class SellarDis1(Component): """Component containing Discipline 1.""" def _

Issue with Expanding Multi-Level ExpandableListView

穿精又带淫゛_ 提交于 2019-11-26 16:39:02
问题 I have a multi level (3 levels, Root -> Parent -> Child) ExpandableListView containing children that are also ExpandableListViews. I'm having no issue filling them up; however, I need to expand a specific item in the Parent level when I first display the Activity (onCreate). I successfully expand the related Root item of the Parent but I can't seem to expand the Parent item. The given listeners are called and yet the result isn't reflected in my multi level list. Activity in which I call the