CITY COUNTRY CITY

tsfmysd's note

Month: November 2016 (page 1 of 2)

LOG ENTRY: PLST 239

カタコトにiriさんきてた.ライブ版ナイトグルーヴよい…….

LOG ENTRY: PLST 237

LaTeX やら Scrivener やら使ってみたけど,結局,Evernote が攻守最強ということになった.


karabinar いったいいつになったら Sierra に対応してくれるんだアアアア嗚呼! karabinar なしだと英字キーボードはほんと使い物にならない(日本語入力はデフォだと Control + Space).


フルモデルの記述統計量の出力のしかた.

 estimate dep val

predict dataset

drop if dataset==.

//////////////////////////////////////////////
///////////*descriptive statistics*///////////
//////////////////////////////////////////////
sort sexa
tabstat leaving, by(sexa) stat(mean sd min max)
tabstat ageb, by(sexa) stat(mean sd min max)
tabstat sibling_1, by(sexa) stat(mean sd min max)
tabstat sibling_2, by(sexa) stat(mean sd min max)
tabstat sibling_3, by(sexa) stat(mean sd min max)
tabstat sibling_4andmore, by(sexa) stat(mean sd min max)
tabstat urban15, by(sexa) stat(mean sd min max)
tabstat income_0, by(sexa) stat(mean sd min max)
tabstat income_less_than_150, by(sexa) stat(mean sd min max)
tabstat income_150_250, by(sexa) stat(mean sd min max)
tabstat income_250_350, by(sexa) stat(mean sd min max)
tabstat income_350_450, by(sexa) stat(mean sd min max)
tabstat income_more_than_450, by(sexa) stat(mean sd min max)
tabstat income_na, by(sexa) stat(mean sd min max)
tabstat univ, by(sexa) stat(mean sd min max)
tabstat univ_father, by(sexa) stat(mean sd min max)
tabstat univ_father_na, by(sexa) stat(mean sd min max)
tabstat wealth15, by(sexa) stat(mean sd min max)
tabstat year, by(sexa) stat(mean sd min max)


俺は困っている.悩み続けるのはよくない.

パラサイトシングル論はそのロジックはともかくとして,ほとんど経験的検証がなされていないか,かなり知見が混乱している.

パラサイトシングル論から導出されるリサーチクエスチョンはいくつかあるが,核となる問いのひとつが,「親元が富裕だと離家への動機づけが弱まるため,親と別居しなくなる」というものである.山田先生の初出からもう20年もたつので,決着がついていてもよさそうだが,ほぼまともな検証がないといってよい状況である.

その理由はさまざま考えられるが,ひとつの問題として,若年未婚者のサンプルを十分に確保できなかったというデータ上の制約があったと考えられる.

そこで,JGSS2000-2010をマージさせて,若年未婚者(20-39歳 *学生除く)を男女それぞれ1500ほど確保し,ロジットでやってみた.

結論から申し上げると,むしろ親元がゆたかなほうが親と別居しているという結果になりました(男子のみ).これは,直感的には説明がつかない.

メインは出身地との交互作用だったんだけど,出身地(三大都市圏)との交互作用をいれると,都市出身者*親世帯年収は離家に負の関連,地方出身*親世帯年収は離家に正の関連になりました.ここは狙い通りに結果がでた.御の字である.社会学なので実験できないけれど,モデルスペキュレーションというやつだ.ただ,繰り返しになるが,交互作用をいれないで,親世帯年収だけいれると離家には正の関連.

*ここでいう親世帯年収は,「あなたが 15 歳の頃のあなたの世帯収入は、当時の平均的な世帯と比べて、どうでしたか」の5件法.本人主観の回顧だけど,分析には一応たえると思っている.

LOG ENTRY: PLST 236

estimate store name
で分析結果をメモリーに保存できる.

論文のtableみたいに表示させたいときは,
estimate store name1 name2 namex
で呼び出せる.

表示させる数値はデフォだとcoef.
b(%7.4f) p stats(N df_m r2_p)
たとえば,これだと,bは7桁まで出力して(みにくいから4桁まで表示),p値,統計量(サンプルサイズ,df,疑似決定係数).詳しくは, help-logistic-Stored resultsを参照するとよい.

AICはよくわからんかった.
estat ic
でそれぞれのモデルについては出力してくれる.たまにはこれぐらい自分で計算したほうがいいかもしれない(数理的な意味は何度読んでもさっぱりわからんが)

Stored results

logistic stores the following in e():

Scalars
e(N) number of observations
e(N_cds) number of completely determined successes
e(N_cdf) number of completely determined failures
e(k) number of parameters
e(k_eq) number of equations in e(b)
e(k_eq_model) number of equations in overall model test
e(k_dv) number of dependent variables
e(df_m) model degrees of freedom
e(r2_p) pseudo-R-squared
e(ll) log likelihood
e(ll_0) log likelihood, constant-only model
e(N_clust) number of clusters
e(chi2) chi-squared
e(p) significance of model test
e(rank) rank of e(V)
e(ic) number of iterations
e(rc) return code
e(converged) 1 if converged, 0 otherwise

他人のがみたい.

/*model 1*/
logit leaving ///
male_dummy ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year
estimate store model1

/*model 2 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year if male_dummy==1
estimate store model2ma

/*model 2 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year if male_dummy==0
estimate store model2fe

/*model 3 male*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year int_urban_wealth if male_dummy==1
estimate store model3ma

/*model 3 female*/
sort male_dummy
logit leaving ///
ageb sibling_1 sibling_3 sibling_4andmore urban15 ///
income_0 income_less_than_150 income_150_250 income_350_450 income_more_than_450 income_na univ ///
univ_father univ_father_na wealth15 ///
year int_urban_wealth if male_dummy==0
estimate store model3fe

estimate table model1 model2ma model2fe model3ma model3fe, b(%7.4f) p stats(N df_m r2_p)


Stata が出力してくれる疑似決定係数(Pseudo R2)の値,いったいなんなのかよくわかってないんだけど,どうも McFadden’s R2 ぽい.確証はない.http://www.ats.ucla.edu/stat/mult_pkg/faq/general/Psuedo_RSquareds.htm

 

LOG ENTRY: PLST 234

アプリからは管理画面に入れるのだけど,ブラウザからはワードプレスの管理画面に入れない.

Forbidden

The server refuse to browse the page.
The URL or value may not be correct. Please confirm the value.
TIME: 1479554796.085639 (2016-11-19 20:26:36 (+0900))
METHOD: POST
PATH_QUERY: /wp-login.php

SAKURA Internet Inc.

サイト自体は生きているので,問題はサーバーじゃない.お金も払ってるし.いろいろ調べたらファイヤウォール周りらしい.Webアプリケーションファイアウォール検知ログをみると,やたら攻撃されてた.ワードプレス脆弱だなあ.おもいきって,ドメイン自体のファイヤウォールを切った.もともとワードプレスはやべえという話はきいておいたので,さくらとワードプレスのPasswordは適当につくった謎の文字列にしているので,まあなにかあったところでとくに困らない.さいきんのJetpack周りの誤作動もここ由来なのかな.さくら側からワードプレスのアップデートしたけど,Forbiddenは解決しない.

mail はこことは関係ないとこで管理しているのでたぶん影響ない.ふつうに届いているし.


Stataで多重クロス表はたぶんデフォではできない.

sort val1
by val1: tab val2 dep

で三重クロスはできる.もうちょっと便利そうなパッケージをみつけた.

findit tab3way

で三重クロスのコマンドがインスコできる.ただし,ふつうの tabとはオプションのコマンドが違うので注意が必要.

—————————————————————————–
help for tab3way v2.03 2002-06-01
—————————————————————————–

Cross-tabulation of 3 variables with display of percentages

tab3way rowvar colvar supercolvar [weight] [if exp] [in range] [, cellpct
rowpct colpct allpct rowtot coltot scoltot
alltot format(%fmt) {freq|nofreq} usemiss]

by varlist: may be used with tab3way to stratify tables. See help by.

fweights are allowed. See help weights.
Description

tab3way cross-tabulates 3 variables and displays any combination of cell
frequencies, cell percents, row percents and column percents.
“Missing” categories may be specified.
tab3way optionally provides row, column and supercolumn totals by
temporarily augmenting observations in the existing data set and
making a new category (labelled “TOTAL”) for each variable to
accommodate these totals.
tab3way is a front end for tabdisp, although not all of the
latter’s options are implemented here.
Options

freq|nofreq displays|does not display cell frequencies. freq is the
default.

cellpct displays cell percentages. The denominator of the cell
percentage is the total N over the entire table.

rowpct displays row percentages. The denominator for the row
percentage is the total N over all categories of the
supercolvar within a specific rowvar/colvar combination.

colpct displays column percentages. The denominator for the column
percentage is the total N over all categories of the rowvar
within a specific supercolvar/colvar combination.

allpct displays cell frequencies and cell, row and column
percentages. Specifying none of cellpct, rowpct, colpct or
allpct provides just frequencies (default).

rowtot displays row totals.

coltot displays column totals.

scoltot displays supercolumn totals.

alltot displays row, column and supercolumn totals.

usemiss shows missing values as a separate category, similar to
tabulate.., missing. (missing is an option for tab3way insofar
as it is passed to tabdisp, where it has a different role.)

format(%fmt) specifies the display format for presenting percentages in
the table’s cells (the frequencies, if specified, are always
displayed as integers). The default is %8.2f, which gives 2
decimal places.

In addition, any of the following options allowed by tabdisp may be
specified: center, missing, cellwidth(#), csepwidth(#), scsepwidth(#),
stubwidth(#).
Examples

. use auto
. egen price_cat = cut(price), group(4)
. tab3way price_cat rep78 foreign, rowpct colp format(%5.3f)
. egen weight_cat = cut(weight), group(2)
. bysort weight_cat: tab3way price_cat rep78 foreign, allp allt usemiss
Author

Philip Ryan
Department of Public Health
University of Adelaide
South Australia
email: philip.ryan@adelaide.edu.au
Also see

On-line: help for tabdisp, table, tabulate

これとbyとifを組み合わせれば5重クロスぐらいだったらなんとかなりそうだけど,それ以上はどうすればいいんだろ? わからんちん.

こんなかんじになる.screen-shot-2016-11-20-at-23-45-21

表頭変数は1つだけが好みなんだけどなあ.そういう設定はどうやったらできるのかしら.まあExcelで直せばいいんだけど.識者教えてください.記述的な分析はRのほうが楽かなあ.

LOG ENTRY: PLST 232

いろいろつらい。また風邪ひいた。

LOG ENTRY: PLST 227

「こいしたい,こしいたい」とはなんですか.

LOG ENTRY: PLST 226

スポットライトみた.楽天ショウタイムでオンラインレンタル.

めちゃくちゃよかったよお〜.登場人物や事件の系列が複雑だったので,映画館じゃなくて自宅でむしろよかったかも.記者のひとりがハルク(マーク・ラファロ)だったので,いつブチ切れて緑色の巨人になるかが気になってしょうがなかったw 実際,終盤デスクにブチ切れてたし.すっかりはまり役である.

町山評が的確だった気がするので,とくに私みたいなパンピーに言えることはありません.

Sometimes it’s easy to forget that we spend most of our times stumbling around the dark. suddenly a light gets turns on and there is a fair-share blame to go around.

つい忘れるが,我々はいつも暗闇の中を手探りで歩いている.そこに急に光が射すと,ようやく間違った道を来たことが分かる.

Martin Baron

最後の局長のセリフが象徴的.研究にも通ずるところある.

地下室の教会の年鑑から問題のあった神父の移動歴を復元する作業完全に「ヤバい社会学」だった(Sampson,Robert J. & John H. Laub. 1993. Crime in the Making: Pathways and Turning Points through Life. Cambridge, MA: Harvard University Press. の二人が資料みつけたときもこんな感じだったんだろうな).神父たちの療養施設で働いていた心理療法士サイプさんがボストンで過去に性的虐待をおこなった神父の数を全体の傾向から90人と推定していたが,ほぼほぼスポットライトチームの復元結果と一致してて統計スキーにもオヌヌメです(いちばん,このシーンが一番快楽感じた).


ついにTMUのメールアドレスが完全にしんだ.なにかの終わりを感じる.


今日うごく野田潤さんをはじめてみた.解釈のしかたがほんとに鮮やかな人だなあ.

LOG ENTRY: PLST 224

Jetpackの調子がわるい.たびたびクラッシュするのなんで何?

なんかおもしろいことないかなあ.とりあえず,今はオデッセイ,マッドマックス,レヴェナント,マネーショート,ブリッジオブスパイ,ルームを抑えてアカデミー作品賞を受賞したスポットライトが観たい.今年のアカデミー作品賞ノミネート作品で観てないのこれとブルックリンだった.けっこう去年は映画みにいってたみたいだ.最近は,半年後には youtubeやアマゾンプライムやなんかにうpされるので,そうでもなさそうなものはなかなか見に行く気がしない.スター・トレック・ビヨンドかなり期待してたんだけど,たしかウェルメイドなんだけど,とくに心には残らなかった.取ってつけたような3年旅してて最近ちょっと俺元気ない→なんか事件起きる→謎の現地人の協力もあり解決する(相変わらず遊撃隊をかってでる艦長,まあこれは許す)→あの船長も俺とおなじやったやん→なんとかシティの副艦長やっぱやめます,エンタープライズが俺の居場所だ! 以上.うーん.老スポック関連はちょっとウルッときた.

アカデミー脚色賞,マネーショートがとったのなんというかずるいよな.そりゃあそうなるよと.マイケル・ルイス原作はだいたいずるい.それにしても,マネーショートって邦題はださすぎる(Big Short).どこかの町工場の資金繰りがショートしたみたいなニュアンスじゃない.

携帯の操作音ホント無理なのでどうにかしてほしい.


今日のカタコトラジオ,めちゃくちゃニヤニヤしてしまったw


%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab-2016-11-10-22-38-04

LOG ENTRY: PLST 223

便利なStataショートカット

Do ファイルの実行
⌘+Shift+D(特定の行だけ実行したい場合はそこだけカーソルで選択)

変数の自動入力
変数の最初の2,3文字を入力して Tab

LOG ENTRY: PLST 222

なんかおかしいおかしいと思っていたら,公開されているJGSS2012には15才時居住都道府県(pref15)の情報が削除されていた.調査時点の都道府県情報が08以降なくなっているのは知っていたが,これもかー.ええ,つらい.500人ぐらいみんな0になってた.コードブックには書いてあるので今後も多分公開されないであろう.

PREF15 15歳の頃の居住地(本人):都道府県名(この変数は公開しているデータセットに含まれていない)

Codebook-JGSS2012_Japanese p80

/*15歳時三大都市圏居住*/
/*埼玉千葉東京神奈川愛知三重京都大阪兵庫*/
tab pref15
/*48は外国 88はよくわからん 99は無回答*/
drop if pref15==48 | pref15==88 | pref15==99
gen urban15=0
recode urban15 0=1 if pref15==11 | pref15==12 | pref15==13 | pref15==14 | pref15==23 | pref15==24 | pref15==26 | pref15==27 | pref15==28

#備えよう


えいきょうっていいがちです、すいません。関連がみられただったらまだ許されるかな。

ただ,「親の同居のプラス効果の統計的有意性は弱かった。」とあるが,統計的有意性と効果の大きさは無関係なのではないのか。また,他の章でも同様であるが,分析結果を基本的に「影響」と表現するには慎重であった方がいいだろう。さまざまなモデルを比較しても,わかるのは「影響」ではなく,「相関」でしかないからである(これはパネル調査でも実は同じことが言えるだろう)。

http://ci.nii.ac.jp/els/110009827984.pdf?id=ART0010336711&type=pdf&lang=en&host=cinii&order_no=&ppv_type=0&lang_sw=&no=1478576713&cp=


再録っぽいから読んでないんだけど,SAGEにうpされている目次みると,ただたんにこれまでの既発表論文の再録ではないようだ.にしても洋書はペーパーバックになっても高い.国内だと6校にしか所蔵されていないc.

Goldscheider, Frances and Calvin Goldscheider, 1999, The Changing Transition to Adulthood: Leaving and Returning Home, Thousand Oaks: Sage Publications.

Older posts

© 2024 CITY COUNTRY CITY

Theme by Anders NorenUp ↑